From d2ea9ce40b605daa5b8438a4f6585e8876bc56c4 Mon Sep 17 00:00:00 2001 From: Casper Warden <216465704+casperwardensl@users.noreply.github.com> Date: Fri, 24 Nov 2017 01:00:56 +0000 Subject: [PATCH] Message parser --- example/npm-debug.log | 48 + lib/Bot.ts | 4 +- lib/LoginHandler.ts | 6 +- lib/classes/Agent.ts | 49 + lib/classes/Circuit.ts | 11 + lib/classes/Inventory.ts | 30 + lib/{structs => classes}/LoginParameters.ts | 0 lib/classes/LoginResponse.ts | 330 + lib/classes/Packet.ts | 8 + lib/classes/Region.ts | 15 + lib/{structs => classes}/UUID.ts | 0 lib/classes/Vector3.ts | 6 + lib/classes/packets/TEMPLATE.ts | 9 + lib/enums/MessageFlags.ts | 10 + lib/index.ts | 2 +- lib/structs/Avatar.ts | 8 - lib/structs/LoginResponse.ts | 114 - lib/structs/Vector3.ts | 6 - lib/tsm/{tsm.ts => common.js} | 81 +- lib/tsm/mat2.js | 197 + lib/tsm/mat2.ts | 435 +- lib/tsm/mat3.js | 360 + lib/tsm/mat3.ts | 925 +- lib/tsm/mat4.js | 448 + lib/tsm/mat4.ts | 1089 ++- lib/tsm/quat.js | 415 + lib/tsm/quat.ts | 1140 ++- lib/tsm/tsm.js | 36 + lib/tsm/vec2.js | 265 + lib/tsm/vec2.ts | 571 +- lib/tsm/vec3.js | 338 + lib/tsm/vec3.ts | 822 +- lib/tsm/vec4.js | 399 + lib/tsm/vec4.ts | 854 +- package.json | 4 +- tools/msg_template.json | 1 + tools/msg_template.msg | 9131 +++++++++++++++++++ tools/parseMessageTemplate.js | 144 + 38 files changed, 15208 insertions(+), 3103 deletions(-) create mode 100644 example/npm-debug.log create mode 100644 lib/classes/Agent.ts create mode 100644 lib/classes/Circuit.ts create mode 100644 lib/classes/Inventory.ts rename lib/{structs => classes}/LoginParameters.ts (100%) create mode 100644 lib/classes/LoginResponse.ts create mode 100644 lib/classes/Packet.ts create mode 100644 lib/classes/Region.ts rename lib/{structs => classes}/UUID.ts (100%) create mode 100644 lib/classes/Vector3.ts create mode 100644 lib/classes/packets/TEMPLATE.ts create mode 100644 lib/enums/MessageFlags.ts delete mode 100644 lib/structs/Avatar.ts delete mode 100644 lib/structs/LoginResponse.ts delete mode 100644 lib/structs/Vector3.ts rename lib/tsm/{tsm.ts => common.js} (95%) create mode 100644 lib/tsm/mat2.js create mode 100644 lib/tsm/mat3.js create mode 100644 lib/tsm/mat4.js create mode 100644 lib/tsm/quat.js create mode 100644 lib/tsm/tsm.js create mode 100644 lib/tsm/vec2.js create mode 100644 lib/tsm/vec3.js create mode 100644 lib/tsm/vec4.js create mode 100644 tools/msg_template.json create mode 100644 tools/msg_template.msg create mode 100644 tools/parseMessageTemplate.js diff --git a/example/npm-debug.log b/example/npm-debug.log new file mode 100644 index 0000000..ae090d0 --- /dev/null +++ b/example/npm-debug.log @@ -0,0 +1,48 @@ +0 info it worked if it ends with ok +1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe', +1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js', +1 verbose cli 'run', +1 verbose cli 'build' ] +2 info using npm@3.10.10 +3 info using node@v6.11.1 +4 verbose run-script [ 'prebuild', 'build', 'postbuild' ] +5 info lifecycle node-metaverse@0.0.1~prebuild: node-metaverse@0.0.1 +6 silly lifecycle node-metaverse@0.0.1~prebuild: no script for prebuild, continuing +7 info lifecycle node-metaverse@0.0.1~build: node-metaverse@0.0.1 +8 verbose lifecycle node-metaverse@0.0.1~build: unsafe-perm in lifecycle true +9 verbose lifecycle node-metaverse@0.0.1~build: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;C:\Projects\node-metaverse\node_modules\.bin;C:\Program Files\ImageMagick-6.9.8-Q16;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64\compiler;C:\Program Files\Oculus\Support\oculus-runtime;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\PuTTY\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\OpenVPN\bin;C:\Program Files (x86)\Skype\Phone\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\TortoiseGit\bin;C:\Program Files\nodejs\;C:\Program Files\Java\jdk1.8.0_141\bin;C:\ApacheAnt\bin;C:\Users\Tom\AppData\local\Android\sdk\tools;C:\Users\Tom\AppData\local\Android\sdk\platform-tools;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Git\cmd;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\ffmpeg\bin;C:\Python27;C:\php;C:\ProgramData\ComposerSetup\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Users\Tom\AppData\Local\Microsoft\WindowsApps;C:\Users\Tom\AppData\Roaming\npm;C:\Users\Tom\AppData\Roaming\Composer\vendor\bin +10 verbose lifecycle node-metaverse@0.0.1~build: CWD: C:\Projects\node-metaverse +11 silly lifecycle node-metaverse@0.0.1~build: Args: [ '/d /s /c', 'tsc --removeComments' ] +12 silly lifecycle node-metaverse@0.0.1~build: Returned: code: 2 signal: null +13 info lifecycle node-metaverse@0.0.1~build: Failed to exec build script +14 verbose stack Error: node-metaverse@0.0.1 build: `tsc --removeComments` +14 verbose stack Exit status 2 +14 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:255:16) +14 verbose stack at emitTwo (events.js:106:13) +14 verbose stack at EventEmitter.emit (events.js:191:7) +14 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:40:14) +14 verbose stack at emitTwo (events.js:106:13) +14 verbose stack at ChildProcess.emit (events.js:191:7) +14 verbose stack at maybeClose (internal/child_process.js:891:16) +14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5) +15 verbose pkgid node-metaverse@0.0.1 +16 verbose cwd C:\Projects\node-metaverse\example +17 error Windows_NT 10.0.16299 +18 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build" +19 error node v6.11.1 +20 error npm v3.10.10 +21 error code ELIFECYCLE +22 error node-metaverse@0.0.1 build: `tsc --removeComments` +22 error Exit status 2 +23 error Failed at the node-metaverse@0.0.1 build script 'tsc --removeComments'. +23 error Make sure you have the latest version of node.js and npm installed. +23 error If you do, this is most likely a problem with the node-metaverse package, +23 error not with npm itself. +23 error Tell the author that this fails on your system: +23 error tsc --removeComments +23 error You can get information on how to open an issue for this project with: +23 error npm bugs node-metaverse +23 error Or if that isn't available, you can get their info via: +23 error npm owner ls node-metaverse +23 error There is likely additional logging output above. +24 verbose exit [ 1, true ] diff --git a/lib/Bot.ts b/lib/Bot.ts index 5ed2595..77e92c4 100644 --- a/lib/Bot.ts +++ b/lib/Bot.ts @@ -1,6 +1,6 @@ import {LoginHandler} from './LoginHandler'; -import {LoginResponse} from './structs/LoginResponse'; -import {LoginParameters} from './structs/LoginParameters'; +import {LoginResponse} from './classes/LoginResponse'; +import {LoginParameters} from './classes/LoginParameters'; export class Bot { diff --git a/lib/LoginHandler.ts b/lib/LoginHandler.ts index dafb856..5b3a8fa 100644 --- a/lib/LoginHandler.ts +++ b/lib/LoginHandler.ts @@ -1,8 +1,8 @@ import * as xmlrpc from 'xmlrpc'; import * as crypto from 'crypto'; import * as uuid from 'uuid'; -import {LoginParameters} from './structs/LoginParameters'; -import {LoginResponse} from './structs/LoginResponse'; +import {LoginParameters} from './classes/LoginParameters'; +import {LoginResponse} from './classes/LoginResponse'; export class LoginHandler { @@ -79,6 +79,8 @@ export class LoginHandler } else { + const response = new LoginResponse(value); + resolve(response); } } diff --git a/lib/classes/Agent.ts b/lib/classes/Agent.ts new file mode 100644 index 0000000..e5a983e --- /dev/null +++ b/lib/classes/Agent.ts @@ -0,0 +1,49 @@ +import {UUID} from './UUID'; +import {Vector3} from './Vector3'; +import {Inventory} from './Inventory'; +import Long = require('long'); + +export class Agent +{ + firstName: string; + lastName: string; + agentID: UUID; + accessMax: string; + regionAccess: string; + agentAccess: string; + openID: { + 'token'?: string, + 'url'?: string + } = {}; + AOTransition: boolean; + buddyList: { + 'buddyRightsGiven': boolean, + 'buddyID': UUID, + 'buddyRightsHas': boolean + }[] = []; + uiFlags: { + 'allowFirstLife'?: boolean + } = {}; + lookAt: Vector3; + maxGroups: number; + agentFlags: number; + startLocation: string; + cofVersion: number; + home: { + 'regionHandle'?: Long, + 'position'?: Vector3, + 'lookAt'?: Vector3 + } = {}; + snapshotConfigURL: string; + inventory: Inventory; + gestures: { + assetID: UUID, + itemID: UUID + }[] = []; + agentAppearanceService: string; + + constructor() + { + this.inventory = new Inventory(); + } +} diff --git a/lib/classes/Circuit.ts b/lib/classes/Circuit.ts new file mode 100644 index 0000000..c54d2f1 --- /dev/null +++ b/lib/classes/Circuit.ts @@ -0,0 +1,11 @@ +import {UUID} from './UUID'; + +export class Circuit +{ + secureSessionID: UUID; + sessionID: UUID; + circuitCode: number; + udpBlacklist: string[]; + timestamp: number; + seedCapability: string; +} diff --git a/lib/classes/Inventory.ts b/lib/classes/Inventory.ts new file mode 100644 index 0000000..61c4562 --- /dev/null +++ b/lib/classes/Inventory.ts @@ -0,0 +1,30 @@ +import {UUID} from '../structs/UUID'; + +export class Inventory +{ + main: { + skeleton: { + typeDefault: number, + version: number, + name: string, + folderID: UUID, + parentID: UUID + }[], + root?: UUID + } = { + skeleton: [] + }; + library: { + owner?: UUID, + skeleton: { + typeDefault: number, + version: number, + name: string, + folderID: UUID, + parentID: UUID + }[], + root?: UUID + } = { + skeleton: [] + }; +} diff --git a/lib/structs/LoginParameters.ts b/lib/classes/LoginParameters.ts similarity index 100% rename from lib/structs/LoginParameters.ts rename to lib/classes/LoginParameters.ts diff --git a/lib/classes/LoginResponse.ts b/lib/classes/LoginResponse.ts new file mode 100644 index 0000000..140bb90 --- /dev/null +++ b/lib/classes/LoginResponse.ts @@ -0,0 +1,330 @@ +import {UUID} from './UUID'; +import {Agent} from './Agent'; +import {Circuit} from './Circuit'; +import {Region} from './Region'; +import {LoginFlags} from '../enums/LoginFlags'; +import {Vector3} from './Vector3'; +import Long = require('long'); + +export class LoginResponse +{ + loginFlags: LoginFlags; + loginMessage: string; + agent: Agent; + region: Region; + events: { + categories: { + categoryID: number, + categoryName: string + }[] + } = { + categories: [] + }; + classifieds: { + categories: { + categoryID: number, + categoryName: string + }[] + + } = { + categories: [] + }; + textures: { + 'cloudTextureID'?: UUID, + 'sunTextureID'?: UUID, + 'moonTextureID'?: UUID, + } = {}; + searchToken: string; + + private static toRegionHandle(x_global: number, y_global: number): Long + { + let x_origin: number = x_global; + x_origin -= x_origin % 256; + let y_origin: number = y_global; + y_origin -= y_origin % 256; + return new Long(x_origin, y_origin, true); + } + + private static parseVector3(str: string): Vector3 + { + const num = str.replace(/[\[\]]r/g, '').split(','); + const x = parseFloat(num[0]); + const y = parseFloat(num[1]); + const z = parseFloat(num[2]); + return new Vector3([x, y, z]); + } + + private static parseHome(str: string): { + 'regionHandle'?: Long, + 'position'?: Vector3, + 'lookAt'?: Vector3 + } + { + const result: { + 'regionHandle'?: Long, + 'position'?: Vector3, + 'lookAt'?: Vector3 + } = {}; + + const json = str.replace(/[\[\]']/g, '\"'); + const parsed = JSON.parse(json); + + console.log(parsed); + + if (parsed['region_handle']) + { + const coords = parsed['region_handle'].replace(/r/g, '').split(', '); + result['regionHandle'] = LoginResponse.toRegionHandle(parseInt(coords[0], 10), parseInt(coords[1], 10)); + } + if (parsed['position']) + { + result['position'] = this.parseVector3('[' + parsed['position'] + ']'); + } + if (parsed['look_at']) + { + result['lookAt'] = this.parseVector3('[' + parsed['lookAt'] + ']'); + } + + + return result; + } + + constructor(json: any) + { + this.agent = new Agent(); + this.region = new Region(); + Object.keys(json).forEach((key: string) => + { + const val: any = json[key]; + switch (key) + { + case 'inventory-skeleton': + val.forEach((item: any) => + { + const skeletonItem: { + typeDefault: number, + version: number, + name: string, + folderID: UUID, + parentID: UUID + } = { + typeDefault: parseInt(item['type_default'], 10), + version: parseInt(item['version'], 10), + name: String(item['name']), + folderID: new UUID(item['folder_id']), + parentID: new UUID(item['parent_id']) + }; + this.agent.inventory.main.skeleton.push(skeletonItem); + }); + break; + case 'inventory-skel-lib': + val.forEach((item: any) => + { + const skeletonItem: { + typeDefault: number, + version: number, + name: string, + folderID: UUID, + parentID: UUID + } = { + typeDefault: parseInt(item['type_default'], 10), + version: parseInt(item['version'], 10), + name: String(item['name']), + folderID: new UUID(item['folder_id']), + parentID: new UUID(item['parent_id']) + }; + this.agent.inventory.library.skeleton.push(skeletonItem); + }); + break; + case 'inventory-root': + this.agent.inventory.main.root = new UUID(val[0]['folder_id']); + break; + case 'inventory-lib-owner': + this.agent.inventory.library.owner = new UUID(val[0]['agent_id']); + break; + case 'inventory-lib-root': + this.agent.inventory.library.root = new UUID(val[0]['folder_id']); + break; + case 'agent_access_max': + this.agent.accessMax = String(val); + break; + case 'event_notifications': + // dunno what this does just yet + break; + case 'secure_session_id': + this.region.circuit.secureSessionID = new UUID(val); + break; + case 'openid_token': + this.agent.openID.token = String(val); + break; + case 'region_x': + this.region.xCoordinate = parseInt(val, 10); + break; + case 'ao_transition': + this.agent.AOTransition = (val !== 0); + break; + case 'global-textures': + val.forEach((obj: any) => + { + if (obj['cloud_texture_id']) + { + this.textures.cloudTextureID = obj['cloud_texture_id']; + } + if (obj['sun_texture_id']) + { + this.textures.sunTextureID = obj['sun_texture_id']; + } + if (obj['moon_texture_id']) + { + this.textures.moonTextureID = obj['moon_texture_id']; + } + }); + break; + case 'search_token': + this.searchToken = String(val); + break; + case 'login-flags': + let flags: LoginFlags = 0; + val.forEach((obj: any) => + { + if (obj['ever_logged_in'] === 'Y') + { + flags = flags | LoginFlags.everLoggedIn; + } + if (obj['daylight_savings'] === 'Y') + { + flags = flags | LoginFlags.daylightSavings; + } + if (obj['stipend_since_login'] === 'Y') + { + flags = flags | LoginFlags.stipendSinceLogin; + } + if (obj['gendered'] === 'Y') + { + flags = flags | LoginFlags.gendered; + } + }); + this.loginFlags = flags; + break; + case 'buddy-list': + val.forEach((obj: any) => + { + this.agent.buddyList.push({ + buddyRightsGiven: obj['buddy_rights_given'] !== 0, + buddyID: new UUID(obj['buddy_id']), + buddyRightsHas: obj['buddy_rights_has'] !== 0, + }); + }); + break; + case 'sim_port': + this.region.port = parseInt(val, 10); + break; + case 'sim_ip': + this.region.ipAddress = String(val); + break; + case 'agent_appearance_service': + this.agent.agentAppearanceService = val; + break; + case 'ui-config': + val.forEach((item: any) => + { + if (item['allow_first_life'] === 'Y') + { + this.agent.uiFlags.allowFirstLife = true; + } + }); + break; + case 'look_at': + this.agent.lookAt = LoginResponse.parseVector3(val); + break; + case 'openid_url': + this.agent.openID.url = String(val); + break; + case 'max-agent-groups': + this.agent.maxGroups = parseInt(val, 10); + break; + case 'session_id': + this.region.circuit.sessionID = new UUID(val); + break; + case 'agent_flags': + this.agent.agentFlags = parseInt(val, 10); + break; + case 'event_categories': + val.forEach((item: any) => + { + this.events.categories.push({ + 'categoryID': parseInt(item['category_id'], 10), + 'categoryName': String(item['category_name']) + }); + }); + break; + case 'start_location': + this.agent.startLocation = String(val); + break; + case 'agent_region_access': + this.agent.regionAccess = String(val); + break; + case 'last_name': + this.agent.lastName = String(val); + break; + case 'cof_version': + this.agent.cofVersion = parseInt(val, 10); + break; + case 'home': + this.agent.home = LoginResponse.parseHome(val); + break; + case 'classified_categories': + val.forEach((item: any) => + { + this.classifieds.categories.push({ + 'categoryID': parseInt(item['category_id'], 10), + 'categoryName': String(item['category_name']) + }); + }); + break; + case 'snapshot_config_url': + this.agent.snapshotConfigURL = String(val); + break; + case 'region_y': + this.region.yCoordinate = parseInt(val, 10); + break; + case 'agent_access': + this.agent.agentAccess = String(val); + break; + case 'circuit_code': + this.region.circuit.circuitCode = parseInt(val, 10); + break; + case 'message': + this.loginMessage = String(val); + break; + case 'gestures': + val.forEach((item: any) => + { + this.agent.gestures.push({ + 'assetID': new UUID(item['asset_id']), + 'itemID': new UUID(item['item_id']) + }); + }); + break; + case 'udp_blacklist': + const list = String(val).split(','); + this.region.circuit.udpBlacklist = list; + break; + case 'agent_id': + this.agent.agentID = new UUID(val); + break; + case 'seconds_since_epoch': + this.region.circuit.timestamp = parseInt(val, 10); + break; + case 'seed_capability': + this.region.circuit.seedCapability = String(val); + break; + case 'first_name': + this.agent.firstName = String(val).replace(/"/g, ''); + break; + + } + }); + console.log(this); + } +} diff --git a/lib/classes/Packet.ts b/lib/classes/Packet.ts new file mode 100644 index 0000000..267b75f --- /dev/null +++ b/lib/classes/Packet.ts @@ -0,0 +1,8 @@ +import {MessageFlags} from '../enums/MessageFlags'; + +export class Packet +{ + name: string; + flags: MessageFlags; + id: number; +} diff --git a/lib/classes/Region.ts b/lib/classes/Region.ts new file mode 100644 index 0000000..0d64680 --- /dev/null +++ b/lib/classes/Region.ts @@ -0,0 +1,15 @@ +import {Circuit} from './Circuit'; + +export class Region +{ + xCoordinate: number; + yCoordinate: number; + port: number; + ipAddress: string; + circuit: Circuit; + + constructor() + { + this.circuit = new Circuit(); + } +} diff --git a/lib/structs/UUID.ts b/lib/classes/UUID.ts similarity index 100% rename from lib/structs/UUID.ts rename to lib/classes/UUID.ts diff --git a/lib/classes/Vector3.ts b/lib/classes/Vector3.ts new file mode 100644 index 0000000..6789964 --- /dev/null +++ b/lib/classes/Vector3.ts @@ -0,0 +1,6 @@ +import {vec3} from '../tsm/vec3'; + +export class Vector3 extends vec3 +{ + +} diff --git a/lib/classes/packets/TEMPLATE.ts b/lib/classes/packets/TEMPLATE.ts new file mode 100644 index 0000000..1f9c2be --- /dev/null +++ b/lib/classes/packets/TEMPLATE.ts @@ -0,0 +1,9 @@ +import {Packet} from '../Packet'; +import {MessageFlags} from '../../enums/MessageFlags'; + +export class TEMPLATEPacket implements Packet +{ + name = 'TEMPLATE'; + flags = MessageFlags.FrequencyFixed; + id = 0xFFFFFFFB; +} diff --git a/lib/enums/MessageFlags.ts b/lib/enums/MessageFlags.ts new file mode 100644 index 0000000..84a3d2c --- /dev/null +++ b/lib/enums/MessageFlags.ts @@ -0,0 +1,10 @@ +export enum MessageFlags +{ + FrequencyHigh = 1, + FrequencyMedium = 2, + FrequencyLow = 4, + FrequencyFixed = 8, + Zerocoded = 16, + Trusted = 32, + Blacklisted = 64 +} diff --git a/lib/index.ts b/lib/index.ts index 41e5883..6f2e63d 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -1,5 +1,5 @@ import {Bot} from './Bot'; -import {LoginParameters} from './structs/LoginParameters'; +import {LoginParameters} from './classes/LoginParameters'; export { Bot, diff --git a/lib/structs/Avatar.ts b/lib/structs/Avatar.ts deleted file mode 100644 index 8d1c49f..0000000 --- a/lib/structs/Avatar.ts +++ /dev/null @@ -1,8 +0,0 @@ -import {UUID} from './UUID'; - -export class Avatar -{ - firstName: string; - lastName: string; - uuid: UUID -} diff --git a/lib/structs/LoginResponse.ts b/lib/structs/LoginResponse.ts deleted file mode 100644 index c0e5eaa..0000000 --- a/lib/structs/LoginResponse.ts +++ /dev/null @@ -1,114 +0,0 @@ -import {Avatar} from './Avatar'; -import {UUID} from './UUID'; -import {Vector3} from './Vector3'; -import {LoginFlags} from '../enums/LoginFlags'; - -export class LoginResponse -{ - inventory: { - main: { - skeleton: [ - { - typeDefault: number, - version: number, - name: string, - folderID: UUID, - parentID: UUID - } - ] - root?: UUID - }, - library: { - owner: UUID, - skeleton: [ - { - typeDefault: number, - version: number, - name: string, - folderID: UUID, - parentID: UUID - } - ] - root?: UUID - } - }; - agent: { - 'avatar': Avatar, - 'accessMax': string, - 'regionAccess': string, - 'agentAccess': string, - 'loginMessage': string, - 'openID': { - 'token': string, - 'url': string - } - 'AOTransition': number, - 'loginFlags': LoginFlags, - 'buddyList': { - 'buddyRightsGiven': boolean, - 'buddyID': UUID, - 'buddyRightsHas': boolean - }, - 'ui': { - 'allowFirstLife': boolean - }, - 'lookAt': Vector3, - 'maxGroups': number, - 'agentFlags': number, - 'startLocation': string, - 'cofVersion': number, - 'home': { - 'regionHandle': number, - 'position': Vector3, - 'lookAt': Vector3 - }, - 'snapshotConfigURL': string - }; - circuit: { - 'secureSessionID': UUID, - 'sessionID': UUID, - 'circuitCode': number, - 'udpBlacklist': [ - string - ], - 'timestamp': number, - 'seedCapability': string - }; - events: { - categories: [ - { - categoryID: number, - categoryName: string - } - ] - }; - classifieds: { - categories: [ - { - categoryID: number, - categoryName: string - } - ] - }; - region: { - 'x': number, - 'y': number, - 'port': number, - 'IP': string - }; - textures: { - 'cloudTextureID': UUID, - 'sunTextureID': UUID, - 'moonTextureID': UUID, - }; - searchToken: string; - services: { - agentAppearanceService: string - }; - gestures: [ - { - assetID: UUID, - itemID: UUID - } - ]; -} diff --git a/lib/structs/Vector3.ts b/lib/structs/Vector3.ts deleted file mode 100644 index 912dfeb..0000000 --- a/lib/structs/Vector3.ts +++ /dev/null @@ -1,6 +0,0 @@ -import vec3 = TSM.vec3; - -export class Vector3 extends vec3 -{ - -} \ No newline at end of file diff --git a/lib/tsm/tsm.ts b/lib/tsm/common.js similarity index 95% rename from lib/tsm/tsm.ts rename to lib/tsm/common.js index 08b4ca3..6f6f6ba 100644 --- a/lib/tsm/tsm.ts +++ b/lib/tsm/common.js @@ -1,44 +1,37 @@ -/** - * @fileoverview TSM - A TypeScript vector and matrix math library - * @author Matthias Ferch - * @version 0.6 - */ - -/* - * Copyright (c) 2012 Matthias Ferch - * - * Project homepage: https://github.com/matthiasferch/tsm - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and must not - * be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - */ - - -/// -/// -/// - -/// -/// -/// - -/// - - - +/** + * @fileoverview TSM - A TypeScript vector and matrix math library + * @author Matthias Ferch + * @version 0.6 + */ +/* + * Copyright (c) 2012 Matthias Ferch + * + * Project homepage: https://github.com/matthiasferch/tsm + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * + * 2. Altered source versions must be plainly marked as such, and must not + * be misrepresented as being the original software. + * + * 3. This notice may not be removed or altered from any source + * distribution. + */ +var EPSILON = 0.000001; +/// +/// +/// +/// +/// +/// +/// diff --git a/lib/tsm/mat2.js b/lib/tsm/mat2.js new file mode 100644 index 0000000..44bbbd8 --- /dev/null +++ b/lib/tsm/mat2.js @@ -0,0 +1,197 @@ +/** + * @fileoverview TSM - A TypeScript vector and matrix math library + * @author Matthias Ferch + * @version 0.6 + */ +/* + * Copyright (c) 2012 Matthias Ferch + * + * Project homepage: https://github.com/matthiasferch/tsm + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * + * 2. Altered source versions must be plainly marked as such, and must not + * be misrepresented as being the original software. + * + * 3. This notice may not be removed or altered from any source + * distribution. + */ +/// +var TSM; +(function (TSM) { + var mat2 = (function () { + function mat2(values) { + if (values === void 0) { values = null = null; } + this.values = new Float32Array(4); + if (values) { + this.init(values); + } + } + mat2.product = function (m1, m2, result) { + if (result === void 0) { result = null = null; } + var a11 = m1.at(0), a12 = m1.at(1), a21 = m1.at(2), a22 = m1.at(3); + if (result) { + result.init([ + a11 * m2.at(0) + a12 * m2.at(2), + a11 * m2.at(1) + a12 * m2.at(3), + a21 * m2.at(0) + a22 * m2.at(2), + a21 * m2.at(1) + a22 * m2.at(3) + ]); + return result; + } + else { + return new mat2([ + a11 * m2.at(0) + a12 * m2.at(2), + a11 * m2.at(1) + a12 * m2.at(3), + a21 * m2.at(0) + a22 * m2.at(2), + a21 * m2.at(1) + a22 * m2.at(3) + ]); + } + }; + mat2.prototype.at = function (index) { + return this.values[index]; + }; + mat2.prototype.init = function (values) { + for (var i = 0; i < 4; i++) { + this.values[i] = values[i]; + } + return this; + }; + mat2.prototype.reset = function () { + for (var i = 0; i < 4; i++) { + this.values[i] = 0; + } + }; + mat2.prototype.copy = function (dest) { + if (dest === void 0) { dest = null = null; } + if (!dest) { + dest = new mat2(); + } + for (var i = 0; i < 4; i++) { + dest.values[i] = this.values[i]; + } + return dest; + }; + mat2.prototype.all = function () { + var data = []; + for (var i = 0; i < 4; i++) { + data[i] = this.values[i]; + } + return data; + }; + mat2.prototype.row = function (index) { + return [ + this.values[index * 2 + 0], + this.values[index * 2 + 1] + ]; + }; + mat2.prototype.col = function (index) { + return [ + this.values[index], + this.values[index + 2] + ]; + }; + mat2.prototype.equals = function (matrix, threshold) { + if (threshold === void 0) { threshold = EPSILON; } + for (var i = 0; i < 4; i++) { + if (Math.abs(this.values[i] - matrix.at(i)) > threshold) { + return false; + } + } + return true; + }; + mat2.prototype.determinant = function () { + return this.values[0] * this.values[3] - this.values[2] * this.values[1]; + }; + mat2.prototype.setIdentity = function () { + this.values[0] = 1; + this.values[1] = 0; + this.values[2] = 0; + this.values[3] = 1; + return this; + }; + mat2.prototype.transpose = function () { + var temp = this.values[1]; + this.values[1] = this.values[2]; + this.values[2] = temp; + return this; + }; + mat2.prototype.inverse = ; + mat2.identity = new mat2().setIdentity(); + return mat2; + })(); + TSM.mat2 = mat2; + { + var det = this.determinant(); + if (!det) { + return null; + } + det = 1.0 / det; + this.values[0] = det * (this.values[3]); + this.values[1] = det * (-this.values[1]); + this.values[2] = det * (-this.values[2]); + this.values[3] = det * (this.values[0]); + return this; + } + multiply(matrix, mat2); + mat2; + { + var a11 = this.values[0], a12 = this.values[1], a21 = this.values[2], a22 = this.values[3]; + this.values[0] = a11 * matrix.at(0) + a12 * matrix.at(2); + this.values[1] = a11 * matrix.at(1) + a12 * matrix.at(3); + this.values[2] = a21 * matrix.at(0) + a22 * matrix.at(2); + this.values[3] = a21 * matrix.at(1) + a22 * matrix.at(3); + return this; + } + rotate(angle, number); + mat2; + { + var a11 = this.values[0], a12 = this.values[1], a21 = this.values[2], a22 = this.values[3]; + var sin = Math.sin(angle), cos = Math.cos(angle); + this.values[0] = a11 * cos + a12 * sin; + this.values[1] = a11 * -sin + a12 * cos; + this.values[2] = a21 * cos + a22 * sin; + this.values[3] = a21 * -sin + a22 * cos; + return this; + } + multiplyVec2(vector, TSM.vec2, result, TSM.vec2 | null, null); + TSM.vec2; + { + var x = vector.x, y = vector.y; + if (result) { + result.xy = [ + x * this.values[0] + y * this.values[1], + x * this.values[2] + y * this.values[3] + ]; + return result; + } + else { + return new TSM.vec2([ + x * this.values[0] + y * this.values[1], + x * this.values[2] + y * this.values[3] + ]); + } + } + scale(vector, TSM.vec2); + mat2; + { + var a11 = this.values[0], a12 = this.values[1], a21 = this.values[2], a22 = this.values[3]; + var x = vector.x, y = vector.y; + this.values[0] = a11 * x; + this.values[1] = a12 * y; + this.values[2] = a21 * x; + this.values[3] = a22 * y; + return this; + } +})(TSM || (TSM = {})); diff --git a/lib/tsm/mat2.ts b/lib/tsm/mat2.ts index daca2bd..852aaa6 100644 --- a/lib/tsm/mat2.ts +++ b/lib/tsm/mat2.ts @@ -30,250 +30,245 @@ */ -/// +import {vec2} from './vec2'; - -module TSM +export class mat2 { + static identity = new mat2().setIdentity(); - export class mat2 + private values = new Float32Array(4); + + static product(m1: mat2, m2: mat2, result: mat2 | null = null): mat2 { - static identity = new mat2().setIdentity(); + const a11 = m1.at(0), + a12 = m1.at(1), + a21 = m1.at(2), + a22 = m1.at(3); - private values = new Float32Array(4); - - static product(m1: mat2, m2: mat2, result: mat2 | null = null): mat2 + if (result) { - const a11 = m1.at(0), - a12 = m1.at(1), - a21 = m1.at(2), - a22 = m1.at(3); + result.init([ + a11 * m2.at(0) + a12 * m2.at(2), + a11 * m2.at(1) + a12 * m2.at(3), + a21 * m2.at(0) + a22 * m2.at(2), + a21 * m2.at(1) + a22 * m2.at(3) + ]); - if (result) - { - result.init([ - a11 * m2.at(0) + a12 * m2.at(2), - a11 * m2.at(1) + a12 * m2.at(3), - a21 * m2.at(0) + a22 * m2.at(2), - a21 * m2.at(1) + a22 * m2.at(3) - ]); + return result; + } + else + { + return new mat2([ + a11 * m2.at(0) + a12 * m2.at(2), + a11 * m2.at(1) + a12 * m2.at(3), + a21 * m2.at(0) + a22 * m2.at(2), + a21 * m2.at(1) + a22 * m2.at(3) + ]); + } + } - return result; - } - else + constructor(values: number[] | null = null) + { + if (values) + { + this.init(values); + } + } + + at(index: number): number + { + return this.values[index]; + } + + init(values: number[]): mat2 + { + for (let i = 0; i < 4; i++) + { + this.values[i] = values[i]; + } + + return this; + } + + reset(): void + { + for (let i = 0; i < 4; i++) + { + this.values[i] = 0; + } + } + + copy(dest: mat2 | null = null): mat2 + { + if (!dest) + { + dest = new mat2(); + } + + for (let i = 0; i < 4; i++) + { + dest.values[i] = this.values[i]; + } + + return dest; + } + + all(): number[] + { + const data: number[] = []; + for (let i = 0; i < 4; i++) + { + data[i] = this.values[i]; + } + + return data; + } + + row(index: number): number[] + { + return [ + this.values[index * 2 + 0], + this.values[index * 2 + 1] + ]; + } + + col(index: number): number[] + { + return [ + this.values[index], + this.values[index + 2] + ]; + } + + equals(matrix: mat2, threshold = EPSILON): boolean + { + for (let i = 0; i < 4; i++) + { + if (Math.abs(this.values[i] - matrix.at(i)) > threshold) { - return new mat2([ - a11 * m2.at(0) + a12 * m2.at(2), - a11 * m2.at(1) + a12 * m2.at(3), - a21 * m2.at(0) + a22 * m2.at(2), - a21 * m2.at(1) + a22 * m2.at(3) - ]); + return false; } } - constructor(values: number[] | null = null) + return true; + } + + determinant(): number + { + return this.values[0] * this.values[3] - this.values[2] * this.values[1]; + } + + setIdentity(): mat2 + { + this.values[0] = 1; + this.values[1] = 0; + this.values[2] = 0; + this.values[3] = 1; + + return this; + } + + transpose(): mat2 + { + const temp = this.values[1]; + + this.values[1] = this.values[2]; + this.values[2] = temp; + + return this; + } + + inverse(): mat2 | null + { + let det = this.determinant(); + + if (!det) { - if (values) - { - this.init(values); - } + return null; } - at(index: number): number + det = 1.0 / det; + + this.values[0] = det * (this.values[3]); + this.values[1] = det * (-this.values[1]); + this.values[2] = det * (-this.values[2]); + this.values[3] = det * (this.values[0]); + + return this; + } + + multiply(matrix: mat2): mat2 + { + const a11 = this.values[0], + a12 = this.values[1], + a21 = this.values[2], + a22 = this.values[3]; + + this.values[0] = a11 * matrix.at(0) + a12 * matrix.at(2); + this.values[1] = a11 * matrix.at(1) + a12 * matrix.at(3); + this.values[2] = a21 * matrix.at(0) + a22 * matrix.at(2); + this.values[3] = a21 * matrix.at(1) + a22 * matrix.at(3); + + return this; + } + + rotate(angle: number): mat2 + { + const a11 = this.values[0], + a12 = this.values[1], + a21 = this.values[2], + a22 = this.values[3]; + + const sin = Math.sin(angle), + cos = Math.cos(angle); + + this.values[0] = a11 * cos + a12 * sin; + this.values[1] = a11 * -sin + a12 * cos; + this.values[2] = a21 * cos + a22 * sin; + this.values[3] = a21 * -sin + a22 * cos; + + return this; + } + + multiplyVec2(vector: vec2, result: vec2 | null = null): vec2 + { + const x = vector.x, + y = vector.y; + + if (result) { - return this.values[index]; - } - - init(values: number[]): mat2 - { - for (let i = 0; i < 4; i++) - { - this.values[i] = values[i]; - } - - return this; - } - - reset(): void - { - for (let i = 0; i < 4; i++) - { - this.values[i] = 0; - } - } - - copy(dest: mat2 | null = null): mat2 - { - if (!dest) - { - dest = new mat2(); - } - - for (let i = 0; i < 4; i++) - { - dest.values[i] = this.values[i]; - } - - return dest; - } - - all(): number[] - { - const data: number[] = []; - for (let i = 0; i < 4; i++) - { - data[i] = this.values[i]; - } - - return data; - } - - row(index: number): number[] - { - return [ - this.values[index * 2 + 0], - this.values[index * 2 + 1] + result.xy = [ + x * this.values[0] + y * this.values[1], + x * this.values[2] + y * this.values[3] ]; - } - col(index: number): number[] + return result; + } + else { - return [ - this.values[index], - this.values[index + 2] - ]; + return new vec2([ + x * this.values[0] + y * this.values[1], + x * this.values[2] + y * this.values[3] + ]); } + } - equals(matrix: mat2, threshold = EPSILON): boolean - { - for (let i = 0; i < 4; i++) - { - if (Math.abs(this.values[i] - matrix.at(i)) > threshold) - { - return false; - } - } + scale(vector: vec2): mat2 + { + const a11 = this.values[0], + a12 = this.values[1], + a21 = this.values[2], + a22 = this.values[3]; - return true; - } + const x = vector.x, + y = vector.y; - determinant(): number - { - return this.values[0] * this.values[3] - this.values[2] * this.values[1]; - } + this.values[0] = a11 * x; + this.values[1] = a12 * y; + this.values[2] = a21 * x; + this.values[3] = a22 * y; - setIdentity(): mat2 - { - this.values[0] = 1; - this.values[1] = 0; - this.values[2] = 0; - this.values[3] = 1; - - return this; - } - - transpose(): mat2 - { - const temp = this.values[1]; - - this.values[1] = this.values[2]; - this.values[2] = temp; - - return this; - } - - inverse(): mat2 | null - { - let det = this.determinant(); - - if (!det) - { - return null; - } - - det = 1.0 / det; - - this.values[0] = det * (this.values[3]); - this.values[1] = det * (-this.values[1]); - this.values[2] = det * (-this.values[2]); - this.values[3] = det * (this.values[0]); - - return this; - } - - multiply(matrix: mat2): mat2 - { - const a11 = this.values[0], - a12 = this.values[1], - a21 = this.values[2], - a22 = this.values[3]; - - this.values[0] = a11 * matrix.at(0) + a12 * matrix.at(2); - this.values[1] = a11 * matrix.at(1) + a12 * matrix.at(3); - this.values[2] = a21 * matrix.at(0) + a22 * matrix.at(2); - this.values[3] = a21 * matrix.at(1) + a22 * matrix.at(3); - - return this; - } - - rotate(angle: number): mat2 - { - const a11 = this.values[0], - a12 = this.values[1], - a21 = this.values[2], - a22 = this.values[3]; - - const sin = Math.sin(angle), - cos = Math.cos(angle); - - this.values[0] = a11 * cos + a12 * sin; - this.values[1] = a11 * -sin + a12 * cos; - this.values[2] = a21 * cos + a22 * sin; - this.values[3] = a21 * -sin + a22 * cos; - - return this; - } - - multiplyVec2(vector: vec2, result: vec2 | null = null): vec2 - { - const x = vector.x, - y = vector.y; - - if (result) - { - result.xy = [ - x * this.values[0] + y * this.values[1], - x * this.values[2] + y * this.values[3] - ]; - - return result; - } - else - { - return new vec2([ - x * this.values[0] + y * this.values[1], - x * this.values[2] + y * this.values[3] - ]); - } - } - - scale(vector: vec2): mat2 - { - const a11 = this.values[0], - a12 = this.values[1], - a21 = this.values[2], - a22 = this.values[3]; - - const x = vector.x, - y = vector.y; - - this.values[0] = a11 * x; - this.values[1] = a12 * y; - this.values[2] = a21 * x; - this.values[3] = a22 * y; - - return this; - } + return this; } } diff --git a/lib/tsm/mat3.js b/lib/tsm/mat3.js new file mode 100644 index 0000000..69f6624 --- /dev/null +++ b/lib/tsm/mat3.js @@ -0,0 +1,360 @@ +/** + * @fileoverview TSM - A TypeScript vector and matrix math library + * @author Matthias Ferch + * @version 0.6 + */ +/* + * Copyright (c) 2012 Matthias Ferch + * + * Project homepage: https://github.com/matthiasferch/tsm + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * + * 2. Altered source versions must be plainly marked as such, and must not + * be misrepresented as being the original software. + * + * 3. This notice may not be removed or altered from any source + * distribution. + */ +/// +var TSM; +(function (TSM) { + var mat3 = (function () { + function mat3(values) { + if (values === void 0) { values = null = null; } + this.values = new Float32Array(9); + if (values) { + this.init(values); + } + } + mat3.product = function (m1, m2, result) { + if (result === void 0) { result = null = null; } + var a00 = m1.at(0), a01 = m1.at(1), a02 = m1.at(2), a10 = m1.at(3), a11 = m1.at(4), a12 = m1.at(5), a20 = m1.at(6), a21 = m1.at(7), a22 = m1.at(8); + var b00 = m2.at(0), b01 = m2.at(1), b02 = m2.at(2), b10 = m2.at(3), b11 = m2.at(4), b12 = m2.at(5), b20 = m2.at(6), b21 = m2.at(7), b22 = m2.at(8); + if (result) { + result.init([ + b00 * a00 + b01 * a10 + b02 * a20, + b00 * a01 + b01 * a11 + b02 * a21, + b00 * a02 + b01 * a12 + b02 * a22, + b10 * a00 + b11 * a10 + b12 * a20, + b10 * a01 + b11 * a11 + b12 * a21, + b10 * a02 + b11 * a12 + b12 * a22, + b20 * a00 + b21 * a10 + b22 * a20, + b20 * a01 + b21 * a11 + b22 * a21, + b20 * a02 + b21 * a12 + b22 * a22 + ]); + return result; + } + else { + return new mat3([ + b00 * a00 + b01 * a10 + b02 * a20, + b00 * a01 + b01 * a11 + b02 * a21, + b00 * a02 + b01 * a12 + b02 * a22, + b10 * a00 + b11 * a10 + b12 * a20, + b10 * a01 + b11 * a11 + b12 * a21, + b10 * a02 + b11 * a12 + b12 * a22, + b20 * a00 + b21 * a10 + b22 * a20, + b20 * a01 + b21 * a11 + b22 * a21, + b20 * a02 + b21 * a12 + b22 * a22 + ]); + } + }; + mat3.prototype.at = function (index) { + return this.values[index]; + }; + mat3.prototype.init = function (values) { + for (var i = 0; i < 9; i++) { + this.values[i] = values[i]; + } + return this; + }; + mat3.prototype.reset = function () { + for (var i = 0; i < 9; i++) { + this.values[i] = 0; + } + }; + mat3.prototype.copy = function (dest) { + if (dest === void 0) { dest = null = null; } + if (!dest) { + dest = new mat3(); + } + for (var i = 0; i < 9; i++) { + dest.values[i] = this.values[i]; + } + return dest; + }; + mat3.prototype.all = function () { + var data = []; + for (var i = 0; i < 9; i++) { + data[i] = this.values[i]; + } + return data; + }; + mat3.prototype.row = function (index) { + return [ + this.values[index * 3 + 0], + this.values[index * 3 + 1], + this.values[index * 3 + 2] + ]; + }; + mat3.prototype.col = function (index) { + return [ + this.values[index], + this.values[index + 3], + this.values[index + 6] + ]; + }; + mat3.prototype.equals = function (matrix, threshold) { + if (threshold === void 0) { threshold = EPSILON; } + for (var i = 0; i < 9; i++) { + if (Math.abs(this.values[i] - matrix.at(i)) > threshold) { + return false; + } + } + return true; + }; + mat3.prototype.determinant = function () { + var a00 = this.values[0], a01 = this.values[1], a02 = this.values[2], a10 = this.values[3], a11 = this.values[4], a12 = this.values[5], a20 = this.values[6], a21 = this.values[7], a22 = this.values[8]; + var det01 = a22 * a11 - a12 * a21, det11 = -a22 * a10 + a12 * a20, det21 = a21 * a10 - a11 * a20; + return a00 * det01 + a01 * det11 + a02 * det21; + }; + mat3.prototype.setIdentity = function () { + this.values[0] = 1; + this.values[1] = 0; + this.values[2] = 0; + this.values[3] = 0; + this.values[4] = 1; + this.values[5] = 0; + this.values[6] = 0; + this.values[7] = 0; + this.values[8] = 1; + return this; + }; + mat3.prototype.transpose = function () { + var temp01 = this.values[1], temp02 = this.values[2], temp12 = this.values[5]; + this.values[1] = this.values[3]; + this.values[2] = this.values[6]; + this.values[3] = temp01; + this.values[5] = this.values[7]; + this.values[6] = temp02; + this.values[7] = temp12; + return this; + }; + mat3.prototype.inverse = ; + mat3.identity = new mat3().setIdentity(); + return mat3; + })(); + TSM.mat3 = mat3; + { + var a00 = this.values[0], a01 = this.values[1], a02 = this.values[2], a10 = this.values[3], a11 = this.values[4], a12 = this.values[5], a20 = this.values[6], a21 = this.values[7], a22 = this.values[8]; + var det01 = a22 * a11 - a12 * a21, det11 = -a22 * a10 + a12 * a20, det21 = a21 * a10 - a11 * a20; + var det = a00 * det01 + a01 * det11 + a02 * det21; + if (!det) { + return null; + } + det = 1.0 / det; + this.values[0] = det01 * det; + this.values[1] = (-a22 * a01 + a02 * a21) * det; + this.values[2] = (a12 * a01 - a02 * a11) * det; + this.values[3] = det11 * det; + this.values[4] = (a22 * a00 - a02 * a20) * det; + this.values[5] = (-a12 * a00 + a02 * a10) * det; + this.values[6] = det21 * det; + this.values[7] = (-a21 * a00 + a01 * a20) * det; + this.values[8] = (a11 * a00 - a01 * a10) * det; + return this; + } + multiply(matrix, mat3); + mat3; + { + var a00 = this.values[0], a01 = this.values[1], a02 = this.values[2], a10 = this.values[3], a11 = this.values[4], a12 = this.values[5], a20 = this.values[6], a21 = this.values[7], a22 = this.values[8]; + var b00 = matrix.at(0), b01 = matrix.at(1), b02 = matrix.at(2), b10 = matrix.at(3), b11 = matrix.at(4), b12 = matrix.at(5), b20 = matrix.at(6), b21 = matrix.at(7), b22 = matrix.at(8); + this.values[0] = b00 * a00 + b01 * a10 + b02 * a20; + this.values[1] = b00 * a01 + b01 * a11 + b02 * a21; + this.values[2] = b00 * a02 + b01 * a12 + b02 * a22; + this.values[3] = b10 * a00 + b11 * a10 + b12 * a20; + this.values[4] = b10 * a01 + b11 * a11 + b12 * a21; + this.values[5] = b10 * a02 + b11 * a12 + b12 * a22; + this.values[6] = b20 * a00 + b21 * a10 + b22 * a20; + this.values[7] = b20 * a01 + b21 * a11 + b22 * a21; + this.values[8] = b20 * a02 + b21 * a12 + b22 * a22; + return this; + } + multiplyVec2(vector, TSM.vec2, result, TSM.vec2 | null, null); + TSM.vec2; + { + var x = vector.x, y = vector.y; + if (result) { + result.xy = [ + x * this.values[0] + y * this.values[3] + this.values[6], + x * this.values[1] + y * this.values[4] + this.values[7] + ]; + return result; + } + else { + return new TSM.vec2([ + x * this.values[0] + y * this.values[3] + this.values[6], + x * this.values[1] + y * this.values[4] + this.values[7] + ]); + } + } + multiplyVec3(vector, TSM.vec3, result, TSM.vec3 | null, null); + TSM.vec3; + { + var x = vector.x, y = vector.y, z = vector.z; + if (result) { + result.xyz = [ + x * this.values[0] + y * this.values[3] + z * this.values[6], + x * this.values[1] + y * this.values[4] + z * this.values[7], + x * this.values[2] + y * this.values[5] + z * this.values[8] + ]; + return result; + } + else { + return new TSM.vec3([ + x * this.values[0] + y * this.values[3] + z * this.values[6], + x * this.values[1] + y * this.values[4] + z * this.values[7], + x * this.values[2] + y * this.values[5] + z * this.values[8] + ]); + } + } + toMat4(result, TSM.mat4 | null, null); + TSM.mat4; + { + if (result) { + result.init([ + this.values[0], + this.values[1], + this.values[2], + 0, + this.values[3], + this.values[4], + this.values[5], + 0, + this.values[6], + this.values[7], + this.values[8], + 0, + 0, + 0, + 0, + 1 + ]); + return result; + } + else { + return new TSM.mat4([ + this.values[0], + this.values[1], + this.values[2], + 0, + this.values[3], + this.values[4], + this.values[5], + 0, + this.values[6], + this.values[7], + this.values[8], + 0, + 0, + 0, + 0, + 1 + ]); + } + } + toQuat(); + TSM.quat; + { + var m00 = this.values[0], m01 = this.values[1], m02 = this.values[2], m10 = this.values[3], m11 = this.values[4], m12 = this.values[5], m20 = this.values[6], m21 = this.values[7], m22 = this.values[8]; + var fourXSquaredMinus1 = m00 - m11 - m22; + var fourYSquaredMinus1 = m11 - m00 - m22; + var fourZSquaredMinus1 = m22 - m00 - m11; + var fourWSquaredMinus1 = m00 + m11 + m22; + var biggestIndex = 0; + var fourBiggestSquaredMinus1 = fourWSquaredMinus1; + if (fourXSquaredMinus1 > fourBiggestSquaredMinus1) { + fourBiggestSquaredMinus1 = fourXSquaredMinus1; + biggestIndex = 1; + } + if (fourYSquaredMinus1 > fourBiggestSquaredMinus1) { + fourBiggestSquaredMinus1 = fourYSquaredMinus1; + biggestIndex = 2; + } + if (fourZSquaredMinus1 > fourBiggestSquaredMinus1) { + fourBiggestSquaredMinus1 = fourZSquaredMinus1; + biggestIndex = 3; + } + var biggestVal = Math.sqrt(fourBiggestSquaredMinus1 + 1) * 0.5; + var mult = 0.25 / biggestVal; + var result = new TSM.quat(); + switch (biggestIndex) { + case 0: + result.w = biggestVal; + result.x = (m12 - m21) * mult; + result.y = (m20 - m02) * mult; + result.z = (m01 - m10) * mult; + break; + case 1: + result.w = (m12 - m21) * mult; + result.x = biggestVal; + result.y = (m01 + m10) * mult; + result.z = (m20 + m02) * mult; + break; + case 2: + result.w = (m20 - m02) * mult; + result.x = (m01 + m10) * mult; + result.y = biggestVal; + result.z = (m12 + m21) * mult; + break; + case 3: + result.w = (m01 - m10) * mult; + result.x = (m20 + m02) * mult; + result.y = (m12 + m21) * mult; + result.z = biggestVal; + break; + } + return result; + } + rotate(angle, number, axis, TSM.vec3); + mat3 | null; + { + var x = axis.x, y = axis.y, z = axis.z; + var length_1 = Math.sqrt(x * x + y * y + z * z); + if (!length_1) { + return null; + } + if (length_1 !== 1) { + length_1 = 1 / length_1; + x *= length_1; + y *= length_1; + z *= length_1; + } + var s = Math.sin(angle); + var c = Math.cos(angle); + var t = 1.0 - c; + var a00 = this.values[0], a01 = this.values[1], a02 = this.values[2], a10 = this.values[4], a11 = this.values[5], a12 = this.values[6], a20 = this.values[8], a21 = this.values[9], a22 = this.values[10]; + var b00 = x * x * t + c, b01 = y * x * t + z * s, b02 = z * x * t - y * s, b10 = x * y * t - z * s, b11 = y * y * t + c, b12 = z * y * t + x * s, b20 = x * z * t + y * s, b21 = y * z * t - x * s, b22 = z * z * t + c; + this.values[0] = a00 * b00 + a10 * b01 + a20 * b02; + this.values[1] = a01 * b00 + a11 * b01 + a21 * b02; + this.values[2] = a02 * b00 + a12 * b01 + a22 * b02; + this.values[3] = a00 * b10 + a10 * b11 + a20 * b12; + this.values[4] = a01 * b10 + a11 * b11 + a21 * b12; + this.values[5] = a02 * b10 + a12 * b11 + a22 * b12; + this.values[6] = a00 * b20 + a10 * b21 + a20 * b22; + this.values[7] = a01 * b20 + a11 * b21 + a21 * b22; + this.values[8] = a02 * b20 + a12 * b21 + a22 * b22; + return this; + } +})(TSM || (TSM = {})); diff --git a/lib/tsm/mat3.ts b/lib/tsm/mat3.ts index 7fae042..9a8bce7 100644 --- a/lib/tsm/mat3.ts +++ b/lib/tsm/mat3.ts @@ -32,482 +32,483 @@ /// +import {vec3} from './vec3'; +import {quat} from './quat'; +import {mat4} from './mat4'; +import {vec2} from './vec2'; -module TSM +export class mat3 { - export class mat3 + static identity = new mat3().setIdentity(); + + private values = new Float32Array(9); + + static product(m1: mat3, m2: mat3, result: mat3 | null = null): mat3 { - static identity = new mat3().setIdentity(); + const a00 = m1.at(0), a01 = m1.at(1), a02 = m1.at(2), + a10 = m1.at(3), a11 = m1.at(4), a12 = m1.at(5), + a20 = m1.at(6), a21 = m1.at(7), a22 = m1.at(8); - private values = new Float32Array(9); + const b00 = m2.at(0), b01 = m2.at(1), b02 = m2.at(2), + b10 = m2.at(3), b11 = m2.at(4), b12 = m2.at(5), + b20 = m2.at(6), b21 = m2.at(7), b22 = m2.at(8); - static product(m1: mat3, m2: mat3, result: mat3 | null = null): mat3 + if (result) { - const a00 = m1.at(0), a01 = m1.at(1), a02 = m1.at(2), - a10 = m1.at(3), a11 = m1.at(4), a12 = m1.at(5), - a20 = m1.at(6), a21 = m1.at(7), a22 = m1.at(8); - - const b00 = m2.at(0), b01 = m2.at(1), b02 = m2.at(2), - b10 = m2.at(3), b11 = m2.at(4), b12 = m2.at(5), - b20 = m2.at(6), b21 = m2.at(7), b22 = m2.at(8); - - if (result) - { - result.init([ - b00 * a00 + b01 * a10 + b02 * a20, - b00 * a01 + b01 * a11 + b02 * a21, - b00 * a02 + b01 * a12 + b02 * a22, - - b10 * a00 + b11 * a10 + b12 * a20, - b10 * a01 + b11 * a11 + b12 * a21, - b10 * a02 + b11 * a12 + b12 * a22, - - b20 * a00 + b21 * a10 + b22 * a20, - b20 * a01 + b21 * a11 + b22 * a21, - b20 * a02 + b21 * a12 + b22 * a22 - ]); - - return result; - } - else - { - return new mat3([ - b00 * a00 + b01 * a10 + b02 * a20, - b00 * a01 + b01 * a11 + b02 * a21, - b00 * a02 + b01 * a12 + b02 * a22, - - b10 * a00 + b11 * a10 + b12 * a20, - b10 * a01 + b11 * a11 + b12 * a21, - b10 * a02 + b11 * a12 + b12 * a22, - - b20 * a00 + b21 * a10 + b22 * a20, - b20 * a01 + b21 * a11 + b22 * a21, - b20 * a02 + b21 * a12 + b22 * a22 - ]); - } - } - - constructor(values: number[] | null = null) - { - if (values) - { - this.init(values); - } - } - - at(index: number): number - { - return this.values[index]; - } - - init(values: number[]): mat3 - { - for (let i = 0; i < 9; i++) - { - this.values[i] = values[i]; - } - - return this; - } - - reset(): void - { - for (let i = 0; i < 9; i++) - { - this.values[i] = 0; - } - } - - copy(dest: mat3 | null = null): mat3 - { - if (!dest) - { - dest = new mat3(); - } - - for (let i = 0; i < 9; i++) - { - dest.values[i] = this.values[i]; - } - - return dest; - } - - all(): number[] - { - const data: number[] = []; - for (let i = 0; i < 9; i++) - { - data[i] = this.values[i]; - } - - return data; - } - - row(index: number): number[] - { - return [ - this.values[index * 3 + 0], - this.values[index * 3 + 1], - this.values[index * 3 + 2] - ]; - } - - col(index: number): number[] - { - return [ - this.values[index], - this.values[index + 3], - this.values[index + 6] - ]; - } - - equals(matrix: mat3, threshold = EPSILON): boolean - { - for (let i = 0; i < 9; i++) - { - if (Math.abs(this.values[i] - matrix.at(i)) > threshold) - { - return false; - } - } - - return true; - } - - determinant(): number - { - const a00 = this.values[0], a01 = this.values[1], a02 = this.values[2], - a10 = this.values[3], a11 = this.values[4], a12 = this.values[5], - a20 = this.values[6], a21 = this.values[7], a22 = this.values[8]; - - const det01 = a22 * a11 - a12 * a21, - det11 = -a22 * a10 + a12 * a20, - det21 = a21 * a10 - a11 * a20; - - return a00 * det01 + a01 * det11 + a02 * det21; - } - - setIdentity(): mat3 - { - this.values[0] = 1; - this.values[1] = 0; - this.values[2] = 0; - this.values[3] = 0; - this.values[4] = 1; - this.values[5] = 0; - this.values[6] = 0; - this.values[7] = 0; - this.values[8] = 1; - - return this; - } - - transpose(): mat3 - { - const temp01 = this.values[1], - temp02 = this.values[2], - temp12 = this.values[5]; - - this.values[1] = this.values[3]; - this.values[2] = this.values[6]; - this.values[3] = temp01; - this.values[5] = this.values[7]; - this.values[6] = temp02; - this.values[7] = temp12; - - return this; - } - - inverse(): mat3 | null - { - const a00 = this.values[0], a01 = this.values[1], a02 = this.values[2], - a10 = this.values[3], a11 = this.values[4], a12 = this.values[5], - a20 = this.values[6], a21 = this.values[7], a22 = this.values[8]; - - const det01 = a22 * a11 - a12 * a21, - det11 = -a22 * a10 + a12 * a20, - det21 = a21 * a10 - a11 * a20; - - let det = a00 * det01 + a01 * det11 + a02 * det21; - - if (!det) - { - return null; - } - - det = 1.0 / det; - - this.values[0] = det01 * det; - this.values[1] = (-a22 * a01 + a02 * a21) * det; - this.values[2] = (a12 * a01 - a02 * a11) * det; - this.values[3] = det11 * det; - this.values[4] = (a22 * a00 - a02 * a20) * det; - this.values[5] = (-a12 * a00 + a02 * a10) * det; - this.values[6] = det21 * det; - this.values[7] = (-a21 * a00 + a01 * a20) * det; - this.values[8] = (a11 * a00 - a01 * a10) * det; - - return this; - } - - multiply(matrix: mat3): mat3 - { - const a00 = this.values[0], a01 = this.values[1], a02 = this.values[2], - a10 = this.values[3], a11 = this.values[4], a12 = this.values[5], - a20 = this.values[6], a21 = this.values[7], a22 = this.values[8]; - - const b00 = matrix.at(0), b01 = matrix.at(1), b02 = matrix.at(2), - b10 = matrix.at(3), b11 = matrix.at(4), b12 = matrix.at(5), - b20 = matrix.at(6), b21 = matrix.at(7), b22 = matrix.at(8); - - this.values[0] = b00 * a00 + b01 * a10 + b02 * a20; - this.values[1] = b00 * a01 + b01 * a11 + b02 * a21; - this.values[2] = b00 * a02 + b01 * a12 + b02 * a22; - - this.values[3] = b10 * a00 + b11 * a10 + b12 * a20; - this.values[4] = b10 * a01 + b11 * a11 + b12 * a21; - this.values[5] = b10 * a02 + b11 * a12 + b12 * a22; - - this.values[6] = b20 * a00 + b21 * a10 + b22 * a20; - this.values[7] = b20 * a01 + b21 * a11 + b22 * a21; - this.values[8] = b20 * a02 + b21 * a12 + b22 * a22; - - return this; - } - - multiplyVec2(vector: vec2, result: vec2 | null = null): vec2 - { - const x = vector.x, - y = vector.y; - - if (result) - { - result.xy = [ - x * this.values[0] + y * this.values[3] + this.values[6], - x * this.values[1] + y * this.values[4] + this.values[7] - ]; - - return result; - } - else - { - return new vec2([ - x * this.values[0] + y * this.values[3] + this.values[6], - x * this.values[1] + y * this.values[4] + this.values[7] - ]); - } - } - - multiplyVec3(vector: vec3, result: vec3 | null = null): vec3 - { - const x = vector.x, - y = vector.y, - z = vector.z; - - if (result) - { - result.xyz = [ - x * this.values[0] + y * this.values[3] + z * this.values[6], - x * this.values[1] + y * this.values[4] + z * this.values[7], - x * this.values[2] + y * this.values[5] + z * this.values[8] - ]; - - return result; - } - else - { - return new vec3([ - x * this.values[0] + y * this.values[3] + z * this.values[6], - x * this.values[1] + y * this.values[4] + z * this.values[7], - x * this.values[2] + y * this.values[5] + z * this.values[8] - ]); - } - } - - toMat4(result: mat4 | null = null): mat4 - { - if (result) - { - result.init([ - this.values[0], - this.values[1], - this.values[2], - 0, - - this.values[3], - this.values[4], - this.values[5], - 0, - - this.values[6], - this.values[7], - this.values[8], - 0, - - 0, - 0, - 0, - 1 - ]); - - return result; - } - else - { - return new mat4([ - this.values[0], - this.values[1], - this.values[2], - 0, - - this.values[3], - this.values[4], - this.values[5], - 0, - - this.values[6], - this.values[7], - this.values[8], - 0, - - 0, - 0, - 0, - 1 - ]); - } - } - - toQuat(): quat - { - const m00 = this.values[0], m01 = this.values[1], m02 = this.values[2], - m10 = this.values[3], m11 = this.values[4], m12 = this.values[5], - m20 = this.values[6], m21 = this.values[7], m22 = this.values[8]; - - const fourXSquaredMinus1 = m00 - m11 - m22; - const fourYSquaredMinus1 = m11 - m00 - m22; - const fourZSquaredMinus1 = m22 - m00 - m11; - const fourWSquaredMinus1 = m00 + m11 + m22; - - let biggestIndex = 0; - - let fourBiggestSquaredMinus1 = fourWSquaredMinus1; - - if (fourXSquaredMinus1 > fourBiggestSquaredMinus1) - { - fourBiggestSquaredMinus1 = fourXSquaredMinus1; - biggestIndex = 1; - } - - if (fourYSquaredMinus1 > fourBiggestSquaredMinus1) - { - fourBiggestSquaredMinus1 = fourYSquaredMinus1; - biggestIndex = 2; - } - - if (fourZSquaredMinus1 > fourBiggestSquaredMinus1) - { - fourBiggestSquaredMinus1 = fourZSquaredMinus1; - biggestIndex = 3; - } - - const biggestVal = Math.sqrt(fourBiggestSquaredMinus1 + 1) * 0.5; - const mult = 0.25 / biggestVal; - - const result = new quat(); - - switch (biggestIndex) - { - case 0: - - result.w = biggestVal; - result.x = (m12 - m21) * mult; - result.y = (m20 - m02) * mult; - result.z = (m01 - m10) * mult; - - break; - - case 1: - - result.w = (m12 - m21) * mult; - result.x = biggestVal; - result.y = (m01 + m10) * mult; - result.z = (m20 + m02) * mult; - - break; - - case 2: - - result.w = (m20 - m02) * mult; - result.x = (m01 + m10) * mult; - result.y = biggestVal; - result.z = (m12 + m21) * mult; - - break; - - case 3: - - result.w = (m01 - m10) * mult; - result.x = (m20 + m02) * mult; - result.y = (m12 + m21) * mult; - result.z = biggestVal; - - break; - } + result.init([ + b00 * a00 + b01 * a10 + b02 * a20, + b00 * a01 + b01 * a11 + b02 * a21, + b00 * a02 + b01 * a12 + b02 * a22, + + b10 * a00 + b11 * a10 + b12 * a20, + b10 * a01 + b11 * a11 + b12 * a21, + b10 * a02 + b11 * a12 + b12 * a22, + + b20 * a00 + b21 * a10 + b22 * a20, + b20 * a01 + b21 * a11 + b22 * a21, + b20 * a02 + b21 * a12 + b22 * a22 + ]); return result; } - - rotate(angle: number, axis: vec3): mat3 | null + else { - let x = axis.x, - y = axis.y, - z = axis.z; + return new mat3([ + b00 * a00 + b01 * a10 + b02 * a20, + b00 * a01 + b01 * a11 + b02 * a21, + b00 * a02 + b01 * a12 + b02 * a22, - let length = Math.sqrt(x * x + y * y + z * z); + b10 * a00 + b11 * a10 + b12 * a20, + b10 * a01 + b11 * a11 + b12 * a21, + b10 * a02 + b11 * a12 + b12 * a22, - if (!length) - { - return null; - } - - if (length !== 1) - { - length = 1 / length; - x *= length; - y *= length; - z *= length; - } - - const s = Math.sin(angle); - const c = Math.cos(angle); - - const t = 1.0 - c; - - const a00 = this.values[0], a01 = this.values[1], a02 = this.values[2], - a10 = this.values[4], a11 = this.values[5], a12 = this.values[6], - a20 = this.values[8], a21 = this.values[9], a22 = this.values[10]; - - const b00 = x * x * t + c, b01 = y * x * t + z * s, b02 = z * x * t - y * s, - b10 = x * y * t - z * s, b11 = y * y * t + c, b12 = z * y * t + x * s, - b20 = x * z * t + y * s, b21 = y * z * t - x * s, b22 = z * z * t + c; - - this.values[0] = a00 * b00 + a10 * b01 + a20 * b02; - this.values[1] = a01 * b00 + a11 * b01 + a21 * b02; - this.values[2] = a02 * b00 + a12 * b01 + a22 * b02; - - this.values[3] = a00 * b10 + a10 * b11 + a20 * b12; - this.values[4] = a01 * b10 + a11 * b11 + a21 * b12; - this.values[5] = a02 * b10 + a12 * b11 + a22 * b12; - - this.values[6] = a00 * b20 + a10 * b21 + a20 * b22; - this.values[7] = a01 * b20 + a11 * b21 + a21 * b22; - this.values[8] = a02 * b20 + a12 * b21 + a22 * b22; - - return this; + b20 * a00 + b21 * a10 + b22 * a20, + b20 * a01 + b21 * a11 + b22 * a21, + b20 * a02 + b21 * a12 + b22 * a22 + ]); } } + + constructor(values: number[] | null = null) + { + if (values) + { + this.init(values); + } + } + + at(index: number): number + { + return this.values[index]; + } + + init(values: number[]): mat3 + { + for (let i = 0; i < 9; i++) + { + this.values[i] = values[i]; + } + + return this; + } + + reset(): void + { + for (let i = 0; i < 9; i++) + { + this.values[i] = 0; + } + } + + copy(dest: mat3 | null = null): mat3 + { + if (!dest) + { + dest = new mat3(); + } + + for (let i = 0; i < 9; i++) + { + dest.values[i] = this.values[i]; + } + + return dest; + } + + all(): number[] + { + const data: number[] = []; + for (let i = 0; i < 9; i++) + { + data[i] = this.values[i]; + } + + return data; + } + + row(index: number): number[] + { + return [ + this.values[index * 3 + 0], + this.values[index * 3 + 1], + this.values[index * 3 + 2] + ]; + } + + col(index: number): number[] + { + return [ + this.values[index], + this.values[index + 3], + this.values[index + 6] + ]; + } + + equals(matrix: mat3, threshold = EPSILON): boolean + { + for (let i = 0; i < 9; i++) + { + if (Math.abs(this.values[i] - matrix.at(i)) > threshold) + { + return false; + } + } + + return true; + } + + determinant(): number + { + const a00 = this.values[0], a01 = this.values[1], a02 = this.values[2], + a10 = this.values[3], a11 = this.values[4], a12 = this.values[5], + a20 = this.values[6], a21 = this.values[7], a22 = this.values[8]; + + const det01 = a22 * a11 - a12 * a21, + det11 = -a22 * a10 + a12 * a20, + det21 = a21 * a10 - a11 * a20; + + return a00 * det01 + a01 * det11 + a02 * det21; + } + + setIdentity(): mat3 + { + this.values[0] = 1; + this.values[1] = 0; + this.values[2] = 0; + this.values[3] = 0; + this.values[4] = 1; + this.values[5] = 0; + this.values[6] = 0; + this.values[7] = 0; + this.values[8] = 1; + + return this; + } + + transpose(): mat3 + { + const temp01 = this.values[1], + temp02 = this.values[2], + temp12 = this.values[5]; + + this.values[1] = this.values[3]; + this.values[2] = this.values[6]; + this.values[3] = temp01; + this.values[5] = this.values[7]; + this.values[6] = temp02; + this.values[7] = temp12; + + return this; + } + + inverse(): mat3 | null + { + const a00 = this.values[0], a01 = this.values[1], a02 = this.values[2], + a10 = this.values[3], a11 = this.values[4], a12 = this.values[5], + a20 = this.values[6], a21 = this.values[7], a22 = this.values[8]; + + const det01 = a22 * a11 - a12 * a21, + det11 = -a22 * a10 + a12 * a20, + det21 = a21 * a10 - a11 * a20; + + let det = a00 * det01 + a01 * det11 + a02 * det21; + + if (!det) + { + return null; + } + + det = 1.0 / det; + + this.values[0] = det01 * det; + this.values[1] = (-a22 * a01 + a02 * a21) * det; + this.values[2] = (a12 * a01 - a02 * a11) * det; + this.values[3] = det11 * det; + this.values[4] = (a22 * a00 - a02 * a20) * det; + this.values[5] = (-a12 * a00 + a02 * a10) * det; + this.values[6] = det21 * det; + this.values[7] = (-a21 * a00 + a01 * a20) * det; + this.values[8] = (a11 * a00 - a01 * a10) * det; + + return this; + } + + multiply(matrix: mat3): mat3 + { + const a00 = this.values[0], a01 = this.values[1], a02 = this.values[2], + a10 = this.values[3], a11 = this.values[4], a12 = this.values[5], + a20 = this.values[6], a21 = this.values[7], a22 = this.values[8]; + + const b00 = matrix.at(0), b01 = matrix.at(1), b02 = matrix.at(2), + b10 = matrix.at(3), b11 = matrix.at(4), b12 = matrix.at(5), + b20 = matrix.at(6), b21 = matrix.at(7), b22 = matrix.at(8); + + this.values[0] = b00 * a00 + b01 * a10 + b02 * a20; + this.values[1] = b00 * a01 + b01 * a11 + b02 * a21; + this.values[2] = b00 * a02 + b01 * a12 + b02 * a22; + + this.values[3] = b10 * a00 + b11 * a10 + b12 * a20; + this.values[4] = b10 * a01 + b11 * a11 + b12 * a21; + this.values[5] = b10 * a02 + b11 * a12 + b12 * a22; + + this.values[6] = b20 * a00 + b21 * a10 + b22 * a20; + this.values[7] = b20 * a01 + b21 * a11 + b22 * a21; + this.values[8] = b20 * a02 + b21 * a12 + b22 * a22; + + return this; + } + + multiplyVec2(vector: vec2, result: vec2 | null = null): vec2 + { + const x = vector.x, + y = vector.y; + + if (result) + { + result.xy = [ + x * this.values[0] + y * this.values[3] + this.values[6], + x * this.values[1] + y * this.values[4] + this.values[7] + ]; + + return result; + } + else + { + return new vec2([ + x * this.values[0] + y * this.values[3] + this.values[6], + x * this.values[1] + y * this.values[4] + this.values[7] + ]); + } + } + + multiplyVec3(vector: vec3, result: vec3 | null = null): vec3 + { + const x = vector.x, + y = vector.y, + z = vector.z; + + if (result) + { + result.xyz = [ + x * this.values[0] + y * this.values[3] + z * this.values[6], + x * this.values[1] + y * this.values[4] + z * this.values[7], + x * this.values[2] + y * this.values[5] + z * this.values[8] + ]; + + return result; + } + else + { + return new vec3([ + x * this.values[0] + y * this.values[3] + z * this.values[6], + x * this.values[1] + y * this.values[4] + z * this.values[7], + x * this.values[2] + y * this.values[5] + z * this.values[8] + ]); + } + } + + toMat4(result: mat4 | null = null): mat4 + { + if (result) + { + result.init([ + this.values[0], + this.values[1], + this.values[2], + 0, + + this.values[3], + this.values[4], + this.values[5], + 0, + + this.values[6], + this.values[7], + this.values[8], + 0, + + 0, + 0, + 0, + 1 + ]); + + return result; + } + else + { + return new mat4([ + this.values[0], + this.values[1], + this.values[2], + 0, + + this.values[3], + this.values[4], + this.values[5], + 0, + + this.values[6], + this.values[7], + this.values[8], + 0, + + 0, + 0, + 0, + 1 + ]); + } + } + + toQuat(): quat + { + const m00 = this.values[0], m01 = this.values[1], m02 = this.values[2], + m10 = this.values[3], m11 = this.values[4], m12 = this.values[5], + m20 = this.values[6], m21 = this.values[7], m22 = this.values[8]; + + const fourXSquaredMinus1 = m00 - m11 - m22; + const fourYSquaredMinus1 = m11 - m00 - m22; + const fourZSquaredMinus1 = m22 - m00 - m11; + const fourWSquaredMinus1 = m00 + m11 + m22; + + let biggestIndex = 0; + + let fourBiggestSquaredMinus1 = fourWSquaredMinus1; + + if (fourXSquaredMinus1 > fourBiggestSquaredMinus1) + { + fourBiggestSquaredMinus1 = fourXSquaredMinus1; + biggestIndex = 1; + } + + if (fourYSquaredMinus1 > fourBiggestSquaredMinus1) + { + fourBiggestSquaredMinus1 = fourYSquaredMinus1; + biggestIndex = 2; + } + + if (fourZSquaredMinus1 > fourBiggestSquaredMinus1) + { + fourBiggestSquaredMinus1 = fourZSquaredMinus1; + biggestIndex = 3; + } + + const biggestVal = Math.sqrt(fourBiggestSquaredMinus1 + 1) * 0.5; + const mult = 0.25 / biggestVal; + + const result = new quat(); + + switch (biggestIndex) + { + case 0: + + result.w = biggestVal; + result.x = (m12 - m21) * mult; + result.y = (m20 - m02) * mult; + result.z = (m01 - m10) * mult; + + break; + + case 1: + + result.w = (m12 - m21) * mult; + result.x = biggestVal; + result.y = (m01 + m10) * mult; + result.z = (m20 + m02) * mult; + + break; + + case 2: + + result.w = (m20 - m02) * mult; + result.x = (m01 + m10) * mult; + result.y = biggestVal; + result.z = (m12 + m21) * mult; + + break; + + case 3: + + result.w = (m01 - m10) * mult; + result.x = (m20 + m02) * mult; + result.y = (m12 + m21) * mult; + result.z = biggestVal; + + break; + } + + return result; + } + + rotate(angle: number, axis: vec3): mat3 | null + { + let x = axis.x, + y = axis.y, + z = axis.z; + + let length = Math.sqrt(x * x + y * y + z * z); + + if (!length) + { + return null; + } + + if (length !== 1) + { + length = 1 / length; + x *= length; + y *= length; + z *= length; + } + + const s = Math.sin(angle); + const c = Math.cos(angle); + + const t = 1.0 - c; + + const a00 = this.values[0], a01 = this.values[1], a02 = this.values[2], + a10 = this.values[4], a11 = this.values[5], a12 = this.values[6], + a20 = this.values[8], a21 = this.values[9], a22 = this.values[10]; + + const b00 = x * x * t + c, b01 = y * x * t + z * s, b02 = z * x * t - y * s, + b10 = x * y * t - z * s, b11 = y * y * t + c, b12 = z * y * t + x * s, + b20 = x * z * t + y * s, b21 = y * z * t - x * s, b22 = z * z * t + c; + + this.values[0] = a00 * b00 + a10 * b01 + a20 * b02; + this.values[1] = a01 * b00 + a11 * b01 + a21 * b02; + this.values[2] = a02 * b00 + a12 * b01 + a22 * b02; + + this.values[3] = a00 * b10 + a10 * b11 + a20 * b12; + this.values[4] = a01 * b10 + a11 * b11 + a21 * b12; + this.values[5] = a02 * b10 + a12 * b11 + a22 * b12; + + this.values[6] = a00 * b20 + a10 * b21 + a20 * b22; + this.values[7] = a01 * b20 + a11 * b21 + a21 * b22; + this.values[8] = a02 * b20 + a12 * b21 + a22 * b22; + + return this; + } } diff --git a/lib/tsm/mat4.js b/lib/tsm/mat4.js new file mode 100644 index 0000000..2a81844 --- /dev/null +++ b/lib/tsm/mat4.js @@ -0,0 +1,448 @@ +/** + * @fileoverview TSM - A TypeScript vector and matrix math library + * @author Matthias Ferch + * @version 0.6 + */ +/* + * Copyright (c) 2012 Matthias Ferch + * + * Project homepage: https://github.com/matthiasferch/tsm + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * + * 2. Altered source versions must be plainly marked as such, and must not + * be misrepresented as being the original software. + * + * 3. This notice may not be removed or altered from any source + * distribution. + */ +/// +var TSM; +(function (TSM) { + var mat4 = (function () { + function mat4(values) { + if (values === void 0) { values = null = null; } + this.values = new Float32Array(16); + if (values) { + this.init(values); + } + } + mat4.frustum = function (left, right, bottom, top, near, far) { + var rl = (right - left), tb = (top - bottom), fn = (far - near); + return new mat4([ + (near * 2) / rl, + 0, + 0, + 0, + 0, + (near * 2) / tb, + 0, + 0, + (right + left) / rl, + (top + bottom) / tb, + -(far + near) / fn, + -1, + 0, + 0, + -(far * near * 2) / fn, + 0 + ]); + }; + mat4.perspective = function (fov, aspect, near, far) { + var top = near * Math.tan(fov * Math.PI / 360.0), right = top * aspect; + return mat4.frustum(-right, right, -top, top, near, far); + }; + mat4.orthographic = function (left, right, bottom, top, near, far) { + var rl = (right - left), tb = (top - bottom), fn = (far - near); + return new mat4([ + 2 / rl, + 0, + 0, + 0, + 0, + 2 / tb, + 0, + 0, + 0, + 0, + -2 / fn, + 0, + -(left + right) / rl, + -(top + bottom) / tb, + -(far + near) / fn, + 1 + ]); + }; + mat4.lookAt = function (position, target, up) { + if (up === void 0) { up = TSM.vec3.up; } + if (position.equals(target)) { + return this.identity; + } + var z = TSM.vec3.difference(position, target).normalize(); + var x = TSM.vec3.cross(up, z).normalize(); + var y = TSM.vec3.cross(z, x).normalize(); + return new mat4([ + x.x, + y.x, + z.x, + 0, + x.y, + y.y, + z.y, + 0, + x.z, + y.z, + z.z, + 0, + -TSM.vec3.dot(x, position), + -TSM.vec3.dot(y, position), + -TSM.vec3.dot(z, position), + 1 + ]); + }; + mat4.product = function (m1, m2, result) { + if (result === void 0) { result = null = null; } + var a00 = m1.at(0), a01 = m1.at(1), a02 = m1.at(2), a03 = m1.at(3), a10 = m1.at(4), a11 = m1.at(5), a12 = m1.at(6), a13 = m1.at(7), a20 = m1.at(8), a21 = m1.at(9), a22 = m1.at(10), a23 = m1.at(11), a30 = m1.at(12), a31 = m1.at(13), a32 = m1.at(14), a33 = m1.at(15); + var b00 = m2.at(0), b01 = m2.at(1), b02 = m2.at(2), b03 = m2.at(3), b10 = m2.at(4), b11 = m2.at(5), b12 = m2.at(6), b13 = m2.at(7), b20 = m2.at(8), b21 = m2.at(9), b22 = m2.at(10), b23 = m2.at(11), b30 = m2.at(12), b31 = m2.at(13), b32 = m2.at(14), b33 = m2.at(15); + if (result) { + result.init([ + b00 * a00 + b01 * a10 + b02 * a20 + b03 * a30, + b00 * a01 + b01 * a11 + b02 * a21 + b03 * a31, + b00 * a02 + b01 * a12 + b02 * a22 + b03 * a32, + b00 * a03 + b01 * a13 + b02 * a23 + b03 * a33, + b10 * a00 + b11 * a10 + b12 * a20 + b13 * a30, + b10 * a01 + b11 * a11 + b12 * a21 + b13 * a31, + b10 * a02 + b11 * a12 + b12 * a22 + b13 * a32, + b10 * a03 + b11 * a13 + b12 * a23 + b13 * a33, + b20 * a00 + b21 * a10 + b22 * a20 + b23 * a30, + b20 * a01 + b21 * a11 + b22 * a21 + b23 * a31, + b20 * a02 + b21 * a12 + b22 * a22 + b23 * a32, + b20 * a03 + b21 * a13 + b22 * a23 + b23 * a33, + b30 * a00 + b31 * a10 + b32 * a20 + b33 * a30, + b30 * a01 + b31 * a11 + b32 * a21 + b33 * a31, + b30 * a02 + b31 * a12 + b32 * a22 + b33 * a32, + b30 * a03 + b31 * a13 + b32 * a23 + b33 * a33 + ]); + return result; + } + else { + return new mat4([ + b00 * a00 + b01 * a10 + b02 * a20 + b03 * a30, + b00 * a01 + b01 * a11 + b02 * a21 + b03 * a31, + b00 * a02 + b01 * a12 + b02 * a22 + b03 * a32, + b00 * a03 + b01 * a13 + b02 * a23 + b03 * a33, + b10 * a00 + b11 * a10 + b12 * a20 + b13 * a30, + b10 * a01 + b11 * a11 + b12 * a21 + b13 * a31, + b10 * a02 + b11 * a12 + b12 * a22 + b13 * a32, + b10 * a03 + b11 * a13 + b12 * a23 + b13 * a33, + b20 * a00 + b21 * a10 + b22 * a20 + b23 * a30, + b20 * a01 + b21 * a11 + b22 * a21 + b23 * a31, + b20 * a02 + b21 * a12 + b22 * a22 + b23 * a32, + b20 * a03 + b21 * a13 + b22 * a23 + b23 * a33, + b30 * a00 + b31 * a10 + b32 * a20 + b33 * a30, + b30 * a01 + b31 * a11 + b32 * a21 + b33 * a31, + b30 * a02 + b31 * a12 + b32 * a22 + b33 * a32, + b30 * a03 + b31 * a13 + b32 * a23 + b33 * a33 + ]); + } + }; + mat4.prototype.at = function (index) { + return this.values[index]; + }; + mat4.prototype.init = function (values) { + for (var i = 0; i < 16; i++) { + this.values[i] = values[i]; + } + return this; + }; + mat4.prototype.reset = function () { + for (var i = 0; i < 16; i++) { + this.values[i] = 0; + } + }; + mat4.prototype.copy = function (dest) { + if (dest === void 0) { dest = null = null; } + if (!dest) { + dest = new mat4(); + } + for (var i = 0; i < 16; i++) { + dest.values[i] = this.values[i]; + } + return dest; + }; + mat4.prototype.all = function () { + var data = []; + for (var i = 0; i < 16; i++) { + data[i] = this.values[i]; + } + return data; + }; + mat4.prototype.row = function (index) { + return [ + this.values[index * 4 + 0], + this.values[index * 4 + 1], + this.values[index * 4 + 2], + this.values[index * 4 + 3] + ]; + }; + mat4.prototype.col = function (index) { + return [ + this.values[index], + this.values[index + 4], + this.values[index + 8], + this.values[index + 12] + ]; + }; + mat4.prototype.equals = function (matrix, threshold) { + if (threshold === void 0) { threshold = EPSILON; } + for (var i = 0; i < 16; i++) { + if (Math.abs(this.values[i] - matrix.at(i)) > threshold) { + return false; + } + } + return true; + }; + mat4.prototype.determinant = function () { + var a00 = this.values[0], a01 = this.values[1], a02 = this.values[2], a03 = this.values[3], a10 = this.values[4], a11 = this.values[5], a12 = this.values[6], a13 = this.values[7], a20 = this.values[8], a21 = this.values[9], a22 = this.values[10], a23 = this.values[11], a30 = this.values[12], a31 = this.values[13], a32 = this.values[14], a33 = this.values[15]; + var det00 = a00 * a11 - a01 * a10, det01 = a00 * a12 - a02 * a10, det02 = a00 * a13 - a03 * a10, det03 = a01 * a12 - a02 * a11, det04 = a01 * a13 - a03 * a11, det05 = a02 * a13 - a03 * a12, det06 = a20 * a31 - a21 * a30, det07 = a20 * a32 - a22 * a30, det08 = a20 * a33 - a23 * a30, det09 = a21 * a32 - a22 * a31, det10 = a21 * a33 - a23 * a31, det11 = a22 * a33 - a23 * a32; + return (det00 * det11 - det01 * det10 + det02 * det09 + det03 * det08 - det04 * det07 + det05 * det06); + }; + mat4.prototype.setIdentity = function () { + this.values[0] = 1; + this.values[1] = 0; + this.values[2] = 0; + this.values[3] = 0; + this.values[4] = 0; + this.values[5] = 1; + this.values[6] = 0; + this.values[7] = 0; + this.values[8] = 0; + this.values[9] = 0; + this.values[10] = 1; + this.values[11] = 0; + this.values[12] = 0; + this.values[13] = 0; + this.values[14] = 0; + this.values[15] = 1; + return this; + }; + mat4.prototype.transpose = ; + mat4.identity = new mat4().setIdentity(); + return mat4; + })(); + TSM.mat4 = mat4; + { + var temp01 = this.values[1], temp02 = this.values[2], temp03 = this.values[3], temp12 = this.values[6], temp13 = this.values[7], temp23 = this.values[11]; + this.values[1] = this.values[4]; + this.values[2] = this.values[8]; + this.values[3] = this.values[12]; + this.values[4] = temp01; + this.values[6] = this.values[9]; + this.values[7] = this.values[13]; + this.values[8] = temp02; + this.values[9] = temp12; + this.values[11] = this.values[14]; + this.values[12] = temp03; + this.values[13] = temp13; + this.values[14] = temp23; + return this; + } + inverse(); + mat4 | null; + { + var a00 = this.values[0], a01 = this.values[1], a02 = this.values[2], a03 = this.values[3], a10 = this.values[4], a11 = this.values[5], a12 = this.values[6], a13 = this.values[7], a20 = this.values[8], a21 = this.values[9], a22 = this.values[10], a23 = this.values[11], a30 = this.values[12], a31 = this.values[13], a32 = this.values[14], a33 = this.values[15]; + var det00 = a00 * a11 - a01 * a10, det01 = a00 * a12 - a02 * a10, det02 = a00 * a13 - a03 * a10, det03 = a01 * a12 - a02 * a11, det04 = a01 * a13 - a03 * a11, det05 = a02 * a13 - a03 * a12, det06 = a20 * a31 - a21 * a30, det07 = a20 * a32 - a22 * a30, det08 = a20 * a33 - a23 * a30, det09 = a21 * a32 - a22 * a31, det10 = a21 * a33 - a23 * a31, det11 = a22 * a33 - a23 * a32; + var det = (det00 * det11 - det01 * det10 + det02 * det09 + det03 * det08 - det04 * det07 + det05 * det06); + if (!det) { + return null; + } + det = 1.0 / det; + this.values[0] = (a11 * det11 - a12 * det10 + a13 * det09) * det; + this.values[1] = (-a01 * det11 + a02 * det10 - a03 * det09) * det; + this.values[2] = (a31 * det05 - a32 * det04 + a33 * det03) * det; + this.values[3] = (-a21 * det05 + a22 * det04 - a23 * det03) * det; + this.values[4] = (-a10 * det11 + a12 * det08 - a13 * det07) * det; + this.values[5] = (a00 * det11 - a02 * det08 + a03 * det07) * det; + this.values[6] = (-a30 * det05 + a32 * det02 - a33 * det01) * det; + this.values[7] = (a20 * det05 - a22 * det02 + a23 * det01) * det; + this.values[8] = (a10 * det10 - a11 * det08 + a13 * det06) * det; + this.values[9] = (-a00 * det10 + a01 * det08 - a03 * det06) * det; + this.values[10] = (a30 * det04 - a31 * det02 + a33 * det00) * det; + this.values[11] = (-a20 * det04 + a21 * det02 - a23 * det00) * det; + this.values[12] = (-a10 * det09 + a11 * det07 - a12 * det06) * det; + this.values[13] = (a00 * det09 - a01 * det07 + a02 * det06) * det; + this.values[14] = (-a30 * det03 + a31 * det01 - a32 * det00) * det; + this.values[15] = (a20 * det03 - a21 * det01 + a22 * det00) * det; + return this; + } + multiply(matrix, mat4); + mat4; + { + var a00 = this.values[0], a01 = this.values[1], a02 = this.values[2], a03 = this.values[3]; + var a10 = this.values[4], a11 = this.values[5], a12 = this.values[6], a13 = this.values[7]; + var a20 = this.values[8], a21 = this.values[9], a22 = this.values[10], a23 = this.values[11]; + var a30 = this.values[12], a31 = this.values[13], a32 = this.values[14], a33 = this.values[15]; + var b0 = matrix.at(0), b1 = matrix.at(1), b2 = matrix.at(2), b3 = matrix.at(3); + this.values[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; + this.values[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; + this.values[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; + this.values[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; + b0 = matrix.at(4); + b1 = matrix.at(5); + b2 = matrix.at(6); + b3 = matrix.at(7); + this.values[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; + this.values[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; + this.values[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; + this.values[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; + b0 = matrix.at(8); + b1 = matrix.at(9); + b2 = matrix.at(10); + b3 = matrix.at(11); + this.values[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; + this.values[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; + this.values[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; + this.values[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; + b0 = matrix.at(12); + b1 = matrix.at(13); + b2 = matrix.at(14); + b3 = matrix.at(15); + this.values[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; + this.values[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; + this.values[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; + this.values[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; + return this; + } + multiplyVec3(vector, TSM.vec3); + TSM.vec3; + { + var x = vector.x, y = vector.y, z = vector.z; + return new TSM.vec3([ + this.values[0] * x + this.values[4] * y + this.values[8] * z + this.values[12], + this.values[1] * x + this.values[5] * y + this.values[9] * z + this.values[13], + this.values[2] * x + this.values[6] * y + this.values[10] * z + this.values[14] + ]); + } + multiplyVec4(vector, TSM.vec4, dest, TSM.vec4 | null, null); + TSM.vec4; + { + if (!dest) { + dest = new TSM.vec4(); + } + var x = vector.x, y = vector.y, z = vector.z, w = vector.w; + dest.x = this.values[0] * x + this.values[4] * y + this.values[8] * z + this.values[12] * w; + dest.y = this.values[1] * x + this.values[5] * y + this.values[9] * z + this.values[13] * w; + dest.z = this.values[2] * x + this.values[6] * y + this.values[10] * z + this.values[14] * w; + dest.w = this.values[3] * x + this.values[7] * y + this.values[11] * z + this.values[15] * w; + return dest; + } + toMat3(); + TSM.mat3; + { + return new TSM.mat3([ + this.values[0], + this.values[1], + this.values[2], + this.values[4], + this.values[5], + this.values[6], + this.values[8], + this.values[9], + this.values[10] + ]); + } + toInverseMat3(); + TSM.mat3 | null; + { + var a00 = this.values[0], a01 = this.values[1], a02 = this.values[2], a10 = this.values[4], a11 = this.values[5], a12 = this.values[6], a20 = this.values[8], a21 = this.values[9], a22 = this.values[10]; + var det01 = a22 * a11 - a12 * a21, det11 = -a22 * a10 + a12 * a20, det21 = a21 * a10 - a11 * a20; + var det = a00 * det01 + a01 * det11 + a02 * det21; + if (!det) { + return null; + } + det = 1.0 / det; + return new TSM.mat3([ + det01 * det, + (-a22 * a01 + a02 * a21) * det, + (a12 * a01 - a02 * a11) * det, + det11 * det, + (a22 * a00 - a02 * a20) * det, + (-a12 * a00 + a02 * a10) * det, + det21 * det, + (-a21 * a00 + a01 * a20) * det, + (a11 * a00 - a01 * a10) * det + ]); + } + translate(vector, TSM.vec3); + mat4; + { + var x = vector.x, y = vector.y, z = vector.z; + this.values[12] += this.values[0] * x + this.values[4] * y + this.values[8] * z; + this.values[13] += this.values[1] * x + this.values[5] * y + this.values[9] * z; + this.values[14] += this.values[2] * x + this.values[6] * y + this.values[10] * z; + this.values[15] += this.values[3] * x + this.values[7] * y + this.values[11] * z; + return this; + } + scale(vector, TSM.vec3); + mat4; + { + var x = vector.x, y = vector.y, z = vector.z; + this.values[0] *= x; + this.values[1] *= x; + this.values[2] *= x; + this.values[3] *= x; + this.values[4] *= y; + this.values[5] *= y; + this.values[6] *= y; + this.values[7] *= y; + this.values[8] *= z; + this.values[9] *= z; + this.values[10] *= z; + this.values[11] *= z; + return this; + } + rotate(angle, number, axis, TSM.vec3); + mat4 | null; + { + var x = axis.x, y = axis.y, z = axis.z; + var length_1 = Math.sqrt(x * x + y * y + z * z); + if (!length_1) { + return null; + } + if (length_1 !== 1) { + length_1 = 1 / length_1; + x *= length_1; + y *= length_1; + z *= length_1; + } + var s = Math.sin(angle); + var c = Math.cos(angle); + var t = 1.0 - c; + var a00 = this.values[0], a01 = this.values[1], a02 = this.values[2], a03 = this.values[3], a10 = this.values[4], a11 = this.values[5], a12 = this.values[6], a13 = this.values[7], a20 = this.values[8], a21 = this.values[9], a22 = this.values[10], a23 = this.values[11]; + var b00 = x * x * t + c, b01 = y * x * t + z * s, b02 = z * x * t - y * s, b10 = x * y * t - z * s, b11 = y * y * t + c, b12 = z * y * t + x * s, b20 = x * z * t + y * s, b21 = y * z * t - x * s, b22 = z * z * t + c; + this.values[0] = a00 * b00 + a10 * b01 + a20 * b02; + this.values[1] = a01 * b00 + a11 * b01 + a21 * b02; + this.values[2] = a02 * b00 + a12 * b01 + a22 * b02; + this.values[3] = a03 * b00 + a13 * b01 + a23 * b02; + this.values[4] = a00 * b10 + a10 * b11 + a20 * b12; + this.values[5] = a01 * b10 + a11 * b11 + a21 * b12; + this.values[6] = a02 * b10 + a12 * b11 + a22 * b12; + this.values[7] = a03 * b10 + a13 * b11 + a23 * b12; + this.values[8] = a00 * b20 + a10 * b21 + a20 * b22; + this.values[9] = a01 * b20 + a11 * b21 + a21 * b22; + this.values[10] = a02 * b20 + a12 * b21 + a22 * b22; + this.values[11] = a03 * b20 + a13 * b21 + a23 * b22; + return this; + } +})(TSM || (TSM = {})); diff --git a/lib/tsm/mat4.ts b/lib/tsm/mat4.ts index 3876d3b..af962c4 100644 --- a/lib/tsm/mat4.ts +++ b/lib/tsm/mat4.ts @@ -32,606 +32,605 @@ /// +import {vec4} from './vec4'; +import {vec3} from './vec3'; +import {mat3} from './mat3'; -module TSM +export class mat4 { + static identity = new mat4().setIdentity(); - export class mat4 + private values = new Float32Array(16); + + static frustum(left: number, right: number, bottom: number, top: number, near: number, far: number): mat4 { - static identity = new mat4().setIdentity(); + const rl = (right - left), + tb = (top - bottom), + fn = (far - near); - private values = new Float32Array(16); + return new mat4([ + (near * 2) / rl, + 0, + 0, + 0, - static frustum(left: number, right: number, bottom: number, top: number, near: number, far: number): mat4 + 0, + (near * 2) / tb, + 0, + 0, + + (right + left) / rl, + (top + bottom) / tb, + -(far + near) / fn, + -1, + + 0, + 0, + -(far * near * 2) / fn, + 0 + ]); + } + + static perspective(fov: number, aspect: number, near: number, far: number): mat4 + { + const top = near * Math.tan(fov * Math.PI / 360.0), + right = top * aspect; + + return mat4.frustum(-right, right, -top, top, near, far); + } + + static orthographic(left: number, right: number, bottom: number, top: number, near: number, far: number): mat4 + { + const rl = (right - left), + tb = (top - bottom), + fn = (far - near); + + return new mat4([ + 2 / rl, + 0, + 0, + 0, + + 0, + 2 / tb, + 0, + 0, + + 0, + 0, + -2 / fn, + 0, + + -(left + right) / rl, + -(top + bottom) / tb, + -(far + near) / fn, + 1 + ]); + } + + static lookAt(position: vec3, target: vec3, up: vec3 = vec3.up): mat4 + { + if (position.equals(target)) { - const rl = (right - left), - tb = (top - bottom), - fn = (far - near); + return this.identity; + } + const z = vec3.difference(position, target).normalize(); + + const x = vec3.cross(up, z).normalize(); + const y = vec3.cross(z, x).normalize(); + + return new mat4([ + x.x, + y.x, + z.x, + 0, + + x.y, + y.y, + z.y, + 0, + + x.z, + y.z, + z.z, + 0, + + -vec3.dot(x, position), + -vec3.dot(y, position), + -vec3.dot(z, position), + 1 + ]); + } + + static product(m1: mat4, m2: mat4, result: mat4 | null = null): mat4 + { + const a00 = m1.at(0), a01 = m1.at(1), a02 = m1.at(2), a03 = m1.at(3), + a10 = m1.at(4), a11 = m1.at(5), a12 = m1.at(6), a13 = m1.at(7), + a20 = m1.at(8), a21 = m1.at(9), a22 = m1.at(10), a23 = m1.at(11), + a30 = m1.at(12), a31 = m1.at(13), a32 = m1.at(14), a33 = m1.at(15); + + const b00 = m2.at(0), b01 = m2.at(1), b02 = m2.at(2), b03 = m2.at(3), + b10 = m2.at(4), b11 = m2.at(5), b12 = m2.at(6), b13 = m2.at(7), + b20 = m2.at(8), b21 = m2.at(9), b22 = m2.at(10), b23 = m2.at(11), + b30 = m2.at(12), b31 = m2.at(13), b32 = m2.at(14), b33 = m2.at(15); + + if (result) + { + result.init([ + b00 * a00 + b01 * a10 + b02 * a20 + b03 * a30, + b00 * a01 + b01 * a11 + b02 * a21 + b03 * a31, + b00 * a02 + b01 * a12 + b02 * a22 + b03 * a32, + b00 * a03 + b01 * a13 + b02 * a23 + b03 * a33, + + b10 * a00 + b11 * a10 + b12 * a20 + b13 * a30, + b10 * a01 + b11 * a11 + b12 * a21 + b13 * a31, + b10 * a02 + b11 * a12 + b12 * a22 + b13 * a32, + b10 * a03 + b11 * a13 + b12 * a23 + b13 * a33, + + b20 * a00 + b21 * a10 + b22 * a20 + b23 * a30, + b20 * a01 + b21 * a11 + b22 * a21 + b23 * a31, + b20 * a02 + b21 * a12 + b22 * a22 + b23 * a32, + b20 * a03 + b21 * a13 + b22 * a23 + b23 * a33, + + b30 * a00 + b31 * a10 + b32 * a20 + b33 * a30, + b30 * a01 + b31 * a11 + b32 * a21 + b33 * a31, + b30 * a02 + b31 * a12 + b32 * a22 + b33 * a32, + b30 * a03 + b31 * a13 + b32 * a23 + b33 * a33 + ]); + + return result; + } + else + { return new mat4([ - (near * 2) / rl, - 0, - 0, - 0, + b00 * a00 + b01 * a10 + b02 * a20 + b03 * a30, + b00 * a01 + b01 * a11 + b02 * a21 + b03 * a31, + b00 * a02 + b01 * a12 + b02 * a22 + b03 * a32, + b00 * a03 + b01 * a13 + b02 * a23 + b03 * a33, - 0, - (near * 2) / tb, - 0, - 0, + b10 * a00 + b11 * a10 + b12 * a20 + b13 * a30, + b10 * a01 + b11 * a11 + b12 * a21 + b13 * a31, + b10 * a02 + b11 * a12 + b12 * a22 + b13 * a32, + b10 * a03 + b11 * a13 + b12 * a23 + b13 * a33, - (right + left) / rl, - (top + bottom) / tb, - -(far + near) / fn, - -1, + b20 * a00 + b21 * a10 + b22 * a20 + b23 * a30, + b20 * a01 + b21 * a11 + b22 * a21 + b23 * a31, + b20 * a02 + b21 * a12 + b22 * a22 + b23 * a32, + b20 * a03 + b21 * a13 + b22 * a23 + b23 * a33, - 0, - 0, - -(far * near * 2) / fn, - 0 + b30 * a00 + b31 * a10 + b32 * a20 + b33 * a30, + b30 * a01 + b31 * a11 + b32 * a21 + b33 * a31, + b30 * a02 + b31 * a12 + b32 * a22 + b33 * a32, + b30 * a03 + b31 * a13 + b32 * a23 + b33 * a33 ]); } + } - static perspective(fov: number, aspect: number, near: number, far: number): mat4 + constructor(values: number[] | null = null) + { + if (values) { - const top = near * Math.tan(fov * Math.PI / 360.0), - right = top * aspect; + this.init(values); + } + } - return mat4.frustum(-right, right, -top, top, near, far); + at(index: number): number + { + return this.values[index]; + } + + init(values: number[]): mat4 + { + for (let i = 0; i < 16; i++) + { + this.values[i] = values[i]; } - static orthographic(left: number, right: number, bottom: number, top: number, near: number, far: number): mat4 + return this; + } + + reset(): void + { + for (let i = 0; i < 16; i++) { - const rl = (right - left), - tb = (top - bottom), - fn = (far - near); + this.values[i] = 0; + } + } - return new mat4([ - 2 / rl, - 0, - 0, - 0, - - 0, - 2 / tb, - 0, - 0, - - 0, - 0, - -2 / fn, - 0, - - -(left + right) / rl, - -(top + bottom) / tb, - -(far + near) / fn, - 1 - ]); + copy(dest: mat4 | null = null): mat4 + { + if (!dest) + { + dest = new mat4(); } - static lookAt(position: vec3, target: vec3, up: vec3 = vec3.up): mat4 + for (let i = 0; i < 16; i++) { - if (position.equals(target)) - { - return this.identity; - } - - const z = vec3.difference(position, target).normalize(); - - const x = vec3.cross(up, z).normalize(); - const y = vec3.cross(z, x).normalize(); - - return new mat4([ - x.x, - y.x, - z.x, - 0, - - x.y, - y.y, - z.y, - 0, - - x.z, - y.z, - z.z, - 0, - - -vec3.dot(x, position), - -vec3.dot(y, position), - -vec3.dot(z, position), - 1 - ]); + dest.values[i] = this.values[i]; } - static product(m1: mat4, m2: mat4, result: mat4 | null = null): mat4 + return dest; + } + + all(): number[] + { + const data: number[] = []; + for (let i = 0; i < 16; i++) { - const a00 = m1.at(0), a01 = m1.at(1), a02 = m1.at(2), a03 = m1.at(3), - a10 = m1.at(4), a11 = m1.at(5), a12 = m1.at(6), a13 = m1.at(7), - a20 = m1.at(8), a21 = m1.at(9), a22 = m1.at(10), a23 = m1.at(11), - a30 = m1.at(12), a31 = m1.at(13), a32 = m1.at(14), a33 = m1.at(15); + data[i] = this.values[i]; + } - const b00 = m2.at(0), b01 = m2.at(1), b02 = m2.at(2), b03 = m2.at(3), - b10 = m2.at(4), b11 = m2.at(5), b12 = m2.at(6), b13 = m2.at(7), - b20 = m2.at(8), b21 = m2.at(9), b22 = m2.at(10), b23 = m2.at(11), - b30 = m2.at(12), b31 = m2.at(13), b32 = m2.at(14), b33 = m2.at(15); + return data; + } - if (result) + row(index: number): number[] + { + return [ + this.values[index * 4 + 0], + this.values[index * 4 + 1], + this.values[index * 4 + 2], + this.values[index * 4 + 3] + ]; + } + + col(index: number): number[] + { + return [ + this.values[index], + this.values[index + 4], + this.values[index + 8], + this.values[index + 12] + ]; + } + + equals(matrix: mat4, threshold = EPSILON): boolean + { + for (let i = 0; i < 16; i++) + { + if (Math.abs(this.values[i] - matrix.at(i)) > threshold) { - result.init([ - b00 * a00 + b01 * a10 + b02 * a20 + b03 * a30, - b00 * a01 + b01 * a11 + b02 * a21 + b03 * a31, - b00 * a02 + b01 * a12 + b02 * a22 + b03 * a32, - b00 * a03 + b01 * a13 + b02 * a23 + b03 * a33, - - b10 * a00 + b11 * a10 + b12 * a20 + b13 * a30, - b10 * a01 + b11 * a11 + b12 * a21 + b13 * a31, - b10 * a02 + b11 * a12 + b12 * a22 + b13 * a32, - b10 * a03 + b11 * a13 + b12 * a23 + b13 * a33, - - b20 * a00 + b21 * a10 + b22 * a20 + b23 * a30, - b20 * a01 + b21 * a11 + b22 * a21 + b23 * a31, - b20 * a02 + b21 * a12 + b22 * a22 + b23 * a32, - b20 * a03 + b21 * a13 + b22 * a23 + b23 * a33, - - b30 * a00 + b31 * a10 + b32 * a20 + b33 * a30, - b30 * a01 + b31 * a11 + b32 * a21 + b33 * a31, - b30 * a02 + b31 * a12 + b32 * a22 + b33 * a32, - b30 * a03 + b31 * a13 + b32 * a23 + b33 * a33 - ]); - - return result; - } - else - { - return new mat4([ - b00 * a00 + b01 * a10 + b02 * a20 + b03 * a30, - b00 * a01 + b01 * a11 + b02 * a21 + b03 * a31, - b00 * a02 + b01 * a12 + b02 * a22 + b03 * a32, - b00 * a03 + b01 * a13 + b02 * a23 + b03 * a33, - - b10 * a00 + b11 * a10 + b12 * a20 + b13 * a30, - b10 * a01 + b11 * a11 + b12 * a21 + b13 * a31, - b10 * a02 + b11 * a12 + b12 * a22 + b13 * a32, - b10 * a03 + b11 * a13 + b12 * a23 + b13 * a33, - - b20 * a00 + b21 * a10 + b22 * a20 + b23 * a30, - b20 * a01 + b21 * a11 + b22 * a21 + b23 * a31, - b20 * a02 + b21 * a12 + b22 * a22 + b23 * a32, - b20 * a03 + b21 * a13 + b22 * a23 + b23 * a33, - - b30 * a00 + b31 * a10 + b32 * a20 + b33 * a30, - b30 * a01 + b31 * a11 + b32 * a21 + b33 * a31, - b30 * a02 + b31 * a12 + b32 * a22 + b33 * a32, - b30 * a03 + b31 * a13 + b32 * a23 + b33 * a33 - ]); + return false; } } - constructor(values: number[] | null = null) + return true; + } + + determinant(): number + { + const a00 = this.values[0], a01 = this.values[1], a02 = this.values[2], a03 = this.values[3], + a10 = this.values[4], a11 = this.values[5], a12 = this.values[6], a13 = this.values[7], + a20 = this.values[8], a21 = this.values[9], a22 = this.values[10], a23 = this.values[11], + a30 = this.values[12], a31 = this.values[13], a32 = this.values[14], a33 = this.values[15]; + + const det00 = a00 * a11 - a01 * a10, + det01 = a00 * a12 - a02 * a10, + det02 = a00 * a13 - a03 * a10, + det03 = a01 * a12 - a02 * a11, + det04 = a01 * a13 - a03 * a11, + det05 = a02 * a13 - a03 * a12, + det06 = a20 * a31 - a21 * a30, + det07 = a20 * a32 - a22 * a30, + det08 = a20 * a33 - a23 * a30, + det09 = a21 * a32 - a22 * a31, + det10 = a21 * a33 - a23 * a31, + det11 = a22 * a33 - a23 * a32; + + return (det00 * det11 - det01 * det10 + det02 * det09 + det03 * det08 - det04 * det07 + det05 * det06); + } + + setIdentity(): mat4 + { + this.values[0] = 1; + this.values[1] = 0; + this.values[2] = 0; + this.values[3] = 0; + this.values[4] = 0; + this.values[5] = 1; + this.values[6] = 0; + this.values[7] = 0; + this.values[8] = 0; + this.values[9] = 0; + this.values[10] = 1; + this.values[11] = 0; + this.values[12] = 0; + this.values[13] = 0; + this.values[14] = 0; + this.values[15] = 1; + + return this; + } + + transpose(): mat4 | null + { + const temp01 = this.values[1], temp02 = this.values[2], + temp03 = this.values[3], temp12 = this.values[6], + temp13 = this.values[7], temp23 = this.values[11]; + + this.values[1] = this.values[4]; + this.values[2] = this.values[8]; + this.values[3] = this.values[12]; + this.values[4] = temp01; + this.values[6] = this.values[9]; + this.values[7] = this.values[13]; + this.values[8] = temp02; + this.values[9] = temp12; + this.values[11] = this.values[14]; + this.values[12] = temp03; + this.values[13] = temp13; + this.values[14] = temp23; + + return this; + } + + inverse(): mat4 | null + { + const a00 = this.values[0], a01 = this.values[1], a02 = this.values[2], a03 = this.values[3], + a10 = this.values[4], a11 = this.values[5], a12 = this.values[6], a13 = this.values[7], + a20 = this.values[8], a21 = this.values[9], a22 = this.values[10], a23 = this.values[11], + a30 = this.values[12], a31 = this.values[13], a32 = this.values[14], a33 = this.values[15]; + + const det00 = a00 * a11 - a01 * a10, + det01 = a00 * a12 - a02 * a10, + det02 = a00 * a13 - a03 * a10, + det03 = a01 * a12 - a02 * a11, + det04 = a01 * a13 - a03 * a11, + det05 = a02 * a13 - a03 * a12, + det06 = a20 * a31 - a21 * a30, + det07 = a20 * a32 - a22 * a30, + det08 = a20 * a33 - a23 * a30, + det09 = a21 * a32 - a22 * a31, + det10 = a21 * a33 - a23 * a31, + det11 = a22 * a33 - a23 * a32; + + let det = (det00 * det11 - det01 * det10 + det02 * det09 + det03 * det08 - det04 * det07 + det05 * det06); + + if (!det) { - if (values) - { - this.init(values); - } + return null; } - at(index: number): number + det = 1.0 / det; + + this.values[0] = (a11 * det11 - a12 * det10 + a13 * det09) * det; + this.values[1] = (-a01 * det11 + a02 * det10 - a03 * det09) * det; + this.values[2] = (a31 * det05 - a32 * det04 + a33 * det03) * det; + this.values[3] = (-a21 * det05 + a22 * det04 - a23 * det03) * det; + this.values[4] = (-a10 * det11 + a12 * det08 - a13 * det07) * det; + this.values[5] = (a00 * det11 - a02 * det08 + a03 * det07) * det; + this.values[6] = (-a30 * det05 + a32 * det02 - a33 * det01) * det; + this.values[7] = (a20 * det05 - a22 * det02 + a23 * det01) * det; + this.values[8] = (a10 * det10 - a11 * det08 + a13 * det06) * det; + this.values[9] = (-a00 * det10 + a01 * det08 - a03 * det06) * det; + this.values[10] = (a30 * det04 - a31 * det02 + a33 * det00) * det; + this.values[11] = (-a20 * det04 + a21 * det02 - a23 * det00) * det; + this.values[12] = (-a10 * det09 + a11 * det07 - a12 * det06) * det; + this.values[13] = (a00 * det09 - a01 * det07 + a02 * det06) * det; + this.values[14] = (-a30 * det03 + a31 * det01 - a32 * det00) * det; + this.values[15] = (a20 * det03 - a21 * det01 + a22 * det00) * det; + + return this; + } + + multiply(matrix: mat4): mat4 + { + const a00 = this.values[0], a01 = this.values[1], a02 = this.values[2], a03 = this.values[3]; + const a10 = this.values[4], a11 = this.values[5], a12 = this.values[6], a13 = this.values[7]; + const a20 = this.values[8], a21 = this.values[9], a22 = this.values[10], a23 = this.values[11]; + const a30 = this.values[12], a31 = this.values[13], a32 = this.values[14], a33 = this.values[15]; + + let b0 = matrix.at(0), + b1 = matrix.at(1), + b2 = matrix.at(2), + b3 = matrix.at(3); + + this.values[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; + this.values[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; + this.values[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; + this.values[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; + + b0 = matrix.at(4); + b1 = matrix.at(5); + b2 = matrix.at(6); + b3 = matrix.at(7); + + this.values[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; + this.values[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; + this.values[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; + this.values[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; + + b0 = matrix.at(8); + b1 = matrix.at(9); + b2 = matrix.at(10); + b3 = matrix.at(11); + + this.values[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; + this.values[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; + this.values[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; + this.values[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; + + b0 = matrix.at(12); + b1 = matrix.at(13); + b2 = matrix.at(14); + b3 = matrix.at(15); + + this.values[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; + this.values[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; + this.values[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; + this.values[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; + + return this; + } + + multiplyVec3(vector: vec3): vec3 + { + const x = vector.x, + y = vector.y, + z = vector.z; + + return new vec3([ + this.values[0] * x + this.values[4] * y + this.values[8] * z + this.values[12], + this.values[1] * x + this.values[5] * y + this.values[9] * z + this.values[13], + this.values[2] * x + this.values[6] * y + this.values[10] * z + this.values[14] + ]); + } + + multiplyVec4(vector: vec4, dest: vec4 | null = null): vec4 + { + if (!dest) { - return this.values[index]; + dest = new vec4(); } - init(values: number[]): mat4 - { - for (let i = 0; i < 16; i++) - { - this.values[i] = values[i]; - } + const x = vector.x, + y = vector.y, + z = vector.z, + w = vector.w; - return this; + dest.x = this.values[0] * x + this.values[4] * y + this.values[8] * z + this.values[12] * w; + dest.y = this.values[1] * x + this.values[5] * y + this.values[9] * z + this.values[13] * w; + dest.z = this.values[2] * x + this.values[6] * y + this.values[10] * z + this.values[14] * w; + dest.w = this.values[3] * x + this.values[7] * y + this.values[11] * z + this.values[15] * w; + + return dest; + } + + toMat3(): mat3 + { + return new mat3([ + this.values[0], + this.values[1], + this.values[2], + this.values[4], + this.values[5], + this.values[6], + this.values[8], + this.values[9], + this.values[10] + ]); + } + + toInverseMat3(): mat3 | null + { + const a00 = this.values[0], a01 = this.values[1], a02 = this.values[2], + a10 = this.values[4], a11 = this.values[5], a12 = this.values[6], + a20 = this.values[8], a21 = this.values[9], a22 = this.values[10]; + + const det01 = a22 * a11 - a12 * a21, + det11 = -a22 * a10 + a12 * a20, + det21 = a21 * a10 - a11 * a20; + + let det = a00 * det01 + a01 * det11 + a02 * det21; + + if (!det) + { + return null; } - reset(): void + det = 1.0 / det; + + return new mat3([ + det01 * det, + (-a22 * a01 + a02 * a21) * det, + (a12 * a01 - a02 * a11) * det, + det11 * det, + (a22 * a00 - a02 * a20) * det, + (-a12 * a00 + a02 * a10) * det, + det21 * det, + (-a21 * a00 + a01 * a20) * det, + (a11 * a00 - a01 * a10) * det + ]); + } + + translate(vector: vec3): mat4 + { + const x = vector.x, + y = vector.y, + z = vector.z; + + this.values[12] += this.values[0] * x + this.values[4] * y + this.values[8] * z; + this.values[13] += this.values[1] * x + this.values[5] * y + this.values[9] * z; + this.values[14] += this.values[2] * x + this.values[6] * y + this.values[10] * z; + this.values[15] += this.values[3] * x + this.values[7] * y + this.values[11] * z; + + return this; + } + + scale(vector: vec3): mat4 + { + const x = vector.x, + y = vector.y, + z = vector.z; + + this.values[0] *= x; + this.values[1] *= x; + this.values[2] *= x; + this.values[3] *= x; + + this.values[4] *= y; + this.values[5] *= y; + this.values[6] *= y; + this.values[7] *= y; + + this.values[8] *= z; + this.values[9] *= z; + this.values[10] *= z; + this.values[11] *= z; + + return this; + } + + rotate(angle: number, axis: vec3): mat4 | null + { + let x = axis.x, + y = axis.y, + z = axis.z; + + let length = Math.sqrt(x * x + y * y + z * z); + + if (!length) { - for (let i = 0; i < 16; i++) - { - this.values[i] = 0; - } + return null; } - copy(dest: mat4 | null = null): mat4 + if (length !== 1) { - if (!dest) - { - dest = new mat4(); - } - - for (let i = 0; i < 16; i++) - { - dest.values[i] = this.values[i]; - } - - return dest; + length = 1 / length; + x *= length; + y *= length; + z *= length; } - all(): number[] - { - const data: number[] = []; - for (let i = 0; i < 16; i++) - { - data[i] = this.values[i]; - } + const s = Math.sin(angle); + const c = Math.cos(angle); - return data; - } + const t = 1.0 - c; - row(index: number): number[] - { - return [ - this.values[index * 4 + 0], - this.values[index * 4 + 1], - this.values[index * 4 + 2], - this.values[index * 4 + 3] - ]; - } + const a00 = this.values[0], a01 = this.values[1], a02 = this.values[2], a03 = this.values[3], + a10 = this.values[4], a11 = this.values[5], a12 = this.values[6], a13 = this.values[7], + a20 = this.values[8], a21 = this.values[9], a22 = this.values[10], a23 = this.values[11]; - col(index: number): number[] - { - return [ - this.values[index], - this.values[index + 4], - this.values[index + 8], - this.values[index + 12] - ]; - } + const b00 = x * x * t + c, b01 = y * x * t + z * s, b02 = z * x * t - y * s, + b10 = x * y * t - z * s, b11 = y * y * t + c, b12 = z * y * t + x * s, + b20 = x * z * t + y * s, b21 = y * z * t - x * s, b22 = z * z * t + c; - equals(matrix: mat4, threshold = EPSILON): boolean - { - for (let i = 0; i < 16; i++) - { - if (Math.abs(this.values[i] - matrix.at(i)) > threshold) - { - return false; - } - } + this.values[0] = a00 * b00 + a10 * b01 + a20 * b02; + this.values[1] = a01 * b00 + a11 * b01 + a21 * b02; + this.values[2] = a02 * b00 + a12 * b01 + a22 * b02; + this.values[3] = a03 * b00 + a13 * b01 + a23 * b02; - return true; - } + this.values[4] = a00 * b10 + a10 * b11 + a20 * b12; + this.values[5] = a01 * b10 + a11 * b11 + a21 * b12; + this.values[6] = a02 * b10 + a12 * b11 + a22 * b12; + this.values[7] = a03 * b10 + a13 * b11 + a23 * b12; - determinant(): number - { - const a00 = this.values[0], a01 = this.values[1], a02 = this.values[2], a03 = this.values[3], - a10 = this.values[4], a11 = this.values[5], a12 = this.values[6], a13 = this.values[7], - a20 = this.values[8], a21 = this.values[9], a22 = this.values[10], a23 = this.values[11], - a30 = this.values[12], a31 = this.values[13], a32 = this.values[14], a33 = this.values[15]; + this.values[8] = a00 * b20 + a10 * b21 + a20 * b22; + this.values[9] = a01 * b20 + a11 * b21 + a21 * b22; + this.values[10] = a02 * b20 + a12 * b21 + a22 * b22; + this.values[11] = a03 * b20 + a13 * b21 + a23 * b22; - const det00 = a00 * a11 - a01 * a10, - det01 = a00 * a12 - a02 * a10, - det02 = a00 * a13 - a03 * a10, - det03 = a01 * a12 - a02 * a11, - det04 = a01 * a13 - a03 * a11, - det05 = a02 * a13 - a03 * a12, - det06 = a20 * a31 - a21 * a30, - det07 = a20 * a32 - a22 * a30, - det08 = a20 * a33 - a23 * a30, - det09 = a21 * a32 - a22 * a31, - det10 = a21 * a33 - a23 * a31, - det11 = a22 * a33 - a23 * a32; - - return (det00 * det11 - det01 * det10 + det02 * det09 + det03 * det08 - det04 * det07 + det05 * det06); - } - - setIdentity(): mat4 - { - this.values[0] = 1; - this.values[1] = 0; - this.values[2] = 0; - this.values[3] = 0; - this.values[4] = 0; - this.values[5] = 1; - this.values[6] = 0; - this.values[7] = 0; - this.values[8] = 0; - this.values[9] = 0; - this.values[10] = 1; - this.values[11] = 0; - this.values[12] = 0; - this.values[13] = 0; - this.values[14] = 0; - this.values[15] = 1; - - return this; - } - - transpose(): mat4 | null - { - const temp01 = this.values[1], temp02 = this.values[2], - temp03 = this.values[3], temp12 = this.values[6], - temp13 = this.values[7], temp23 = this.values[11]; - - this.values[1] = this.values[4]; - this.values[2] = this.values[8]; - this.values[3] = this.values[12]; - this.values[4] = temp01; - this.values[6] = this.values[9]; - this.values[7] = this.values[13]; - this.values[8] = temp02; - this.values[9] = temp12; - this.values[11] = this.values[14]; - this.values[12] = temp03; - this.values[13] = temp13; - this.values[14] = temp23; - - return this; - } - - inverse(): mat4 | null - { - const a00 = this.values[0], a01 = this.values[1], a02 = this.values[2], a03 = this.values[3], - a10 = this.values[4], a11 = this.values[5], a12 = this.values[6], a13 = this.values[7], - a20 = this.values[8], a21 = this.values[9], a22 = this.values[10], a23 = this.values[11], - a30 = this.values[12], a31 = this.values[13], a32 = this.values[14], a33 = this.values[15]; - - const det00 = a00 * a11 - a01 * a10, - det01 = a00 * a12 - a02 * a10, - det02 = a00 * a13 - a03 * a10, - det03 = a01 * a12 - a02 * a11, - det04 = a01 * a13 - a03 * a11, - det05 = a02 * a13 - a03 * a12, - det06 = a20 * a31 - a21 * a30, - det07 = a20 * a32 - a22 * a30, - det08 = a20 * a33 - a23 * a30, - det09 = a21 * a32 - a22 * a31, - det10 = a21 * a33 - a23 * a31, - det11 = a22 * a33 - a23 * a32; - - let det = (det00 * det11 - det01 * det10 + det02 * det09 + det03 * det08 - det04 * det07 + det05 * det06); - - if (!det) - { - return null; - } - - det = 1.0 / det; - - this.values[0] = (a11 * det11 - a12 * det10 + a13 * det09) * det; - this.values[1] = (-a01 * det11 + a02 * det10 - a03 * det09) * det; - this.values[2] = (a31 * det05 - a32 * det04 + a33 * det03) * det; - this.values[3] = (-a21 * det05 + a22 * det04 - a23 * det03) * det; - this.values[4] = (-a10 * det11 + a12 * det08 - a13 * det07) * det; - this.values[5] = (a00 * det11 - a02 * det08 + a03 * det07) * det; - this.values[6] = (-a30 * det05 + a32 * det02 - a33 * det01) * det; - this.values[7] = (a20 * det05 - a22 * det02 + a23 * det01) * det; - this.values[8] = (a10 * det10 - a11 * det08 + a13 * det06) * det; - this.values[9] = (-a00 * det10 + a01 * det08 - a03 * det06) * det; - this.values[10] = (a30 * det04 - a31 * det02 + a33 * det00) * det; - this.values[11] = (-a20 * det04 + a21 * det02 - a23 * det00) * det; - this.values[12] = (-a10 * det09 + a11 * det07 - a12 * det06) * det; - this.values[13] = (a00 * det09 - a01 * det07 + a02 * det06) * det; - this.values[14] = (-a30 * det03 + a31 * det01 - a32 * det00) * det; - this.values[15] = (a20 * det03 - a21 * det01 + a22 * det00) * det; - - return this; - } - - multiply(matrix: mat4): mat4 - { - const a00 = this.values[0], a01 = this.values[1], a02 = this.values[2], a03 = this.values[3]; - const a10 = this.values[4], a11 = this.values[5], a12 = this.values[6], a13 = this.values[7]; - const a20 = this.values[8], a21 = this.values[9], a22 = this.values[10], a23 = this.values[11]; - const a30 = this.values[12], a31 = this.values[13], a32 = this.values[14], a33 = this.values[15]; - - let b0 = matrix.at(0), - b1 = matrix.at(1), - b2 = matrix.at(2), - b3 = matrix.at(3); - - this.values[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; - this.values[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; - this.values[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; - this.values[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; - - b0 = matrix.at(4); - b1 = matrix.at(5); - b2 = matrix.at(6); - b3 = matrix.at(7); - - this.values[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; - this.values[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; - this.values[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; - this.values[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; - - b0 = matrix.at(8); - b1 = matrix.at(9); - b2 = matrix.at(10); - b3 = matrix.at(11); - - this.values[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; - this.values[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; - this.values[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; - this.values[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; - - b0 = matrix.at(12); - b1 = matrix.at(13); - b2 = matrix.at(14); - b3 = matrix.at(15); - - this.values[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; - this.values[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; - this.values[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; - this.values[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; - - return this; - } - - multiplyVec3(vector: vec3): vec3 - { - const x = vector.x, - y = vector.y, - z = vector.z; - - return new vec3([ - this.values[0] * x + this.values[4] * y + this.values[8] * z + this.values[12], - this.values[1] * x + this.values[5] * y + this.values[9] * z + this.values[13], - this.values[2] * x + this.values[6] * y + this.values[10] * z + this.values[14] - ]); - } - - multiplyVec4(vector: vec4, dest: vec4 | null = null): vec4 - { - if (!dest) - { - dest = new vec4(); - } - - const x = vector.x, - y = vector.y, - z = vector.z, - w = vector.w; - - dest.x = this.values[0] * x + this.values[4] * y + this.values[8] * z + this.values[12] * w; - dest.y = this.values[1] * x + this.values[5] * y + this.values[9] * z + this.values[13] * w; - dest.z = this.values[2] * x + this.values[6] * y + this.values[10] * z + this.values[14] * w; - dest.w = this.values[3] * x + this.values[7] * y + this.values[11] * z + this.values[15] * w; - - return dest; - } - - toMat3(): mat3 - { - return new mat3([ - this.values[0], - this.values[1], - this.values[2], - this.values[4], - this.values[5], - this.values[6], - this.values[8], - this.values[9], - this.values[10] - ]); - } - - toInverseMat3(): mat3 | null - { - const a00 = this.values[0], a01 = this.values[1], a02 = this.values[2], - a10 = this.values[4], a11 = this.values[5], a12 = this.values[6], - a20 = this.values[8], a21 = this.values[9], a22 = this.values[10]; - - const det01 = a22 * a11 - a12 * a21, - det11 = -a22 * a10 + a12 * a20, - det21 = a21 * a10 - a11 * a20; - - let det = a00 * det01 + a01 * det11 + a02 * det21; - - if (!det) - { - return null; - } - - det = 1.0 / det; - - return new mat3([ - det01 * det, - (-a22 * a01 + a02 * a21) * det, - (a12 * a01 - a02 * a11) * det, - det11 * det, - (a22 * a00 - a02 * a20) * det, - (-a12 * a00 + a02 * a10) * det, - det21 * det, - (-a21 * a00 + a01 * a20) * det, - (a11 * a00 - a01 * a10) * det - ]); - } - - translate(vector: vec3): mat4 - { - const x = vector.x, - y = vector.y, - z = vector.z; - - this.values[12] += this.values[0] * x + this.values[4] * y + this.values[8] * z; - this.values[13] += this.values[1] * x + this.values[5] * y + this.values[9] * z; - this.values[14] += this.values[2] * x + this.values[6] * y + this.values[10] * z; - this.values[15] += this.values[3] * x + this.values[7] * y + this.values[11] * z; - - return this; - } - - scale(vector: vec3): mat4 - { - const x = vector.x, - y = vector.y, - z = vector.z; - - this.values[0] *= x; - this.values[1] *= x; - this.values[2] *= x; - this.values[3] *= x; - - this.values[4] *= y; - this.values[5] *= y; - this.values[6] *= y; - this.values[7] *= y; - - this.values[8] *= z; - this.values[9] *= z; - this.values[10] *= z; - this.values[11] *= z; - - return this; - } - - rotate(angle: number, axis: vec3): mat4 | null - { - let x = axis.x, - y = axis.y, - z = axis.z; - - let length = Math.sqrt(x * x + y * y + z * z); - - if (!length) - { - return null; - } - - if (length !== 1) - { - length = 1 / length; - x *= length; - y *= length; - z *= length; - } - - const s = Math.sin(angle); - const c = Math.cos(angle); - - const t = 1.0 - c; - - const a00 = this.values[0], a01 = this.values[1], a02 = this.values[2], a03 = this.values[3], - a10 = this.values[4], a11 = this.values[5], a12 = this.values[6], a13 = this.values[7], - a20 = this.values[8], a21 = this.values[9], a22 = this.values[10], a23 = this.values[11]; - - const b00 = x * x * t + c, b01 = y * x * t + z * s, b02 = z * x * t - y * s, - b10 = x * y * t - z * s, b11 = y * y * t + c, b12 = z * y * t + x * s, - b20 = x * z * t + y * s, b21 = y * z * t - x * s, b22 = z * z * t + c; - - this.values[0] = a00 * b00 + a10 * b01 + a20 * b02; - this.values[1] = a01 * b00 + a11 * b01 + a21 * b02; - this.values[2] = a02 * b00 + a12 * b01 + a22 * b02; - this.values[3] = a03 * b00 + a13 * b01 + a23 * b02; - - this.values[4] = a00 * b10 + a10 * b11 + a20 * b12; - this.values[5] = a01 * b10 + a11 * b11 + a21 * b12; - this.values[6] = a02 * b10 + a12 * b11 + a22 * b12; - this.values[7] = a03 * b10 + a13 * b11 + a23 * b12; - - this.values[8] = a00 * b20 + a10 * b21 + a20 * b22; - this.values[9] = a01 * b20 + a11 * b21 + a21 * b22; - this.values[10] = a02 * b20 + a12 * b21 + a22 * b22; - this.values[11] = a03 * b20 + a13 * b21 + a23 * b22; - - return this; - } + return this; } } diff --git a/lib/tsm/quat.js b/lib/tsm/quat.js new file mode 100644 index 0000000..021b04f --- /dev/null +++ b/lib/tsm/quat.js @@ -0,0 +1,415 @@ +/** + * @fileoverview TSM - A TypeScript vector and matrix math library + * @author Matthias Ferch + * @version 0.6 + */ +/* + * Copyright (c) 2012 Matthias Ferch + * + * Project homepage: https://github.com/matthiasferch/tsm + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * + * 2. Altered source versions must be plainly marked as such, and must not + * be misrepresented as being the original software. + * + * 3. This notice may not be removed or altered from any source + * distribution. + */ +/// +var TSM; +(function (TSM) { + var quat = (function () { + function quat(values) { + if (values === void 0) { values = null = null; } + this.values = new Float32Array(4); + if (values) { + this.xyzw = values; + } + } + quat.dot = function (q1, q2) { + return q1.x * q2.x + q1.y * q2.y + q1.z * q2.z + q1.w * q2.w; + }; + quat.sum = function (q1, q2, dest) { + if (dest === void 0) { dest = null = null; } + if (!dest) { + dest = new quat(); + } + dest.x = q1.x + q2.x; + dest.y = q1.y + q2.y; + dest.z = q1.z + q2.z; + dest.w = q1.w + q2.w; + return dest; + }; + quat.product = function (q1, q2, dest) { + if (dest === void 0) { dest = null = null; } + if (!dest) { + dest = new quat(); + } + var q1x = q1.x, q1y = q1.y, q1z = q1.z, q1w = q1.w, q2x = q2.x, q2y = q2.y, q2z = q2.z, q2w = q2.w; + dest.x = q1x * q2w + q1w * q2x + q1y * q2z - q1z * q2y; + dest.y = q1y * q2w + q1w * q2y + q1z * q2x - q1x * q2z; + dest.z = q1z * q2w + q1w * q2z + q1x * q2y - q1y * q2x; + dest.w = q1w * q2w - q1x * q2x - q1y * q2y - q1z * q2z; + return dest; + }; + quat.cross = function (q1, q2, dest) { + if (dest === void 0) { dest = null = null; } + if (!dest) { + dest = new quat(); + } + var q1x = q1.x, q1y = q1.y, q1z = q1.z, q1w = q1.w, q2x = q2.x, q2y = q2.y, q2z = q2.z, q2w = q2.w; + dest.x = q1w * q2z + q1z * q2w + q1x * q2y - q1y * q2x; + dest.y = q1w * q2w - q1x * q2x - q1y * q2y - q1z * q2z; + dest.z = q1w * q2x + q1x * q2w + q1y * q2z - q1z * q2y; + dest.w = q1w * q2y + q1y * q2w + q1z * q2x - q1x * q2z; + return dest; + }; + quat.shortMix = function (q1, q2, time, dest) { + if (dest === void 0) { dest = null = null; } + if (!dest) { + dest = new quat(); + } + if (time <= 0.0) { + dest.xyzw = q1.xyzw; + return dest; + } + else if (time >= 1.0) { + dest.xyzw = q2.xyzw; + return dest; + } + var cos = quat.dot(q1, q2); + var q2a = q2.copy(); + if (cos < 0.0) { + q2a.inverse(); + cos = -cos; + } + var k0, k1; + if (cos > 0.9999) { + k0 = 1 - time; + k1 = time; + } + else { + var sin = Math.sqrt(1 - cos * cos); + var angle = Math.atan2(sin, cos); + var oneOverSin = 1 / sin; + k0 = Math.sin((1 - time) * angle) * oneOverSin; + k1 = Math.sin((time) * angle) * oneOverSin; + } + dest.x = k0 * q1.x + k1 * q2a.x; + dest.y = k0 * q1.y + k1 * q2a.y; + dest.z = k0 * q1.z + k1 * q2a.z; + dest.w = k0 * q1.w + k1 * q2a.w; + return dest; + }; + quat.mix = function (q1, q2, time, dest) { + if (dest === void 0) { dest = null = null; } + if (!dest) { + dest = new quat(); + } + var cosHalfTheta = q1.x * q2.x + q1.y * q2.y + q1.z * q2.z + q1.w * q2.w; + if (Math.abs(cosHalfTheta) >= 1.0) { + dest.xyzw = q1.xyzw; + return dest; + } + var halfTheta = Math.acos(cosHalfTheta), sinHalfTheta = Math.sqrt(1.0 - cosHalfTheta * cosHalfTheta); + if (Math.abs(sinHalfTheta) < 0.001) { + dest.x = q1.x * 0.5 + q2.x * 0.5; + dest.y = q1.y * 0.5 + q2.y * 0.5; + dest.z = q1.z * 0.5 + q2.z * 0.5; + dest.w = q1.w * 0.5 + q2.w * 0.5; + return dest; + } + var ratioA = Math.sin((1 - time) * halfTheta) / sinHalfTheta, ratioB = Math.sin(time * halfTheta) / sinHalfTheta; + dest.x = q1.x * ratioA + q2.x * ratioB; + dest.y = q1.y * ratioA + q2.y * ratioB; + dest.z = q1.z * ratioA + q2.z * ratioB; + dest.w = q1.w * ratioA + q2.w * ratioB; + return dest; + }; + quat.fromAxis = function (axis, angle, dest) { + if (dest === void 0) { dest = null = null; } + if (!dest) { + dest = new quat(); + } + angle *= 0.5; + var sin = Math.sin(angle); + dest.x = axis.x * sin; + dest.y = axis.y * sin; + dest.z = axis.z * sin; + dest.w = Math.cos(angle); + return dest; + }; + Object.defineProperty(quat.prototype, "x", { + get: function () { + return this.values[0]; + }, + set: function (value) { + this.values[0] = value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(quat.prototype, "y", { + get: function () { + return this.values[1]; + }, + set: function (value) { + this.values[1] = value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(quat.prototype, "z", { + get: function () { + return this.values[2]; + }, + set: function (value) { + this.values[2] = value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(quat.prototype, "w", { + get: function () { + return this.values[3]; + }, + set: function (value) { + this.values[3] = value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(quat.prototype, "xy", { + get: function () { + return [ + this.values[0], + this.values[1] + ]; + }, + set: function (values) { + this.values[0] = values[0]; + this.values[1] = values[1]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(quat.prototype, "xyz", { + get: function () { + return [ + this.values[0], + this.values[1], + this.values[2] + ]; + }, + set: function (values) { + this.values[0] = values[0]; + this.values[1] = values[1]; + this.values[2] = values[2]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(quat.prototype, "xyzw", { + get: function () { + return [ + this.values[0], + this.values[1], + this.values[2], + this.values[3] + ]; + }, + set: function (values) { + this.values[0] = values[0]; + this.values[1] = values[1]; + this.values[2] = values[2]; + this.values[3] = values[3]; + }, + enumerable: true, + configurable: true + }); + quat.prototype.at = function (index) { + return this.values[index]; + }; + quat.prototype.reset = function () { + for (var i = 0; i < 4; i++) { + this.values[i] = 0; + } + }; + quat.prototype.copy = function (dest) { + if (dest === void 0) { dest = null = null; } + if (!dest) { + dest = new quat(); + } + for (var i = 0; i < 4; i++) { + dest.values[i] = this.values[i]; + } + return dest; + }; + quat.prototype.roll = function () { + var x = this.x, y = this.y, z = this.z, w = this.w; + return Math.atan2(2.0 * (x * y + w * z), w * w + x * x - y * y - z * z); + }; + quat.prototype.pitch = function () { + var x = this.x, y = this.y, z = this.z, w = this.w; + return Math.atan2(2.0 * (y * z + w * x), w * w - x * x - y * y + z * z); + }; + quat.prototype.yaw = function () { + return Math.asin(2.0 * (this.x * this.z - this.w * this.y)); + }; + quat.prototype.equals = function (vector, threshold) { + if (threshold === void 0) { threshold = EPSILON; } + for (var i = 0; i < 4; i++) { + if (Math.abs(this.values[i] - vector.at(i)) > threshold) { + return false; + } + } + return true; + }; + quat.prototype.setIdentity = function () { + this.x = 0; + this.y = 0; + this.z = 0; + this.w = 1; + return this; + }; + quat.prototype.calculateW = function () { + var x = this.x, y = this.y, z = this.z; + this.w = -(Math.sqrt(Math.abs(1.0 - x * x - y * y - z * z))); + return this; + }; + quat.prototype.inverse = function () { + var dot = quat.dot(this, this); + if (!dot) { + this.xyzw = [0, 0, 0, 0]; + return this; + } + var invDot = dot ? 1.0 / dot : 0; + this.x *= -invDot; + this.y *= -invDot; + this.z *= -invDot; + this.w *= invDot; + return this; + }; + quat.prototype.conjugate = function () { + this.values[0] *= -1; + this.values[1] *= -1; + this.values[2] *= -1; + return this; + }; + quat.prototype.length = function () { + var x = this.x, y = this.y, z = this.z, w = this.w; + return Math.sqrt(x * x + y * y + z * z + w * w); + }; + quat.prototype.normalize = function (dest) { + if (dest === void 0) { dest = null = null; } + if (!dest) { + dest = this; + } + var x = this.x, y = this.y, z = this.z, w = this.w; + var length = Math.sqrt(x * x + y * y + z * z + w * w); + if (!length) { + dest.x = 0; + dest.y = 0; + dest.z = 0; + dest.w = 0; + return dest; + } + length = 1 / length; + dest.x = x * length; + dest.y = y * length; + dest.z = z * length; + dest.w = w * length; + return dest; + }; + quat.prototype.add = function (other) { + for (var i = 0; i < 4; i++) { + this.values[i] += other.at(i); + } + return this; + }; + quat.prototype.multiply = function (other) { + var q1x = this.values[0], q1y = this.values[1], q1z = this.values[2], q1w = this.values[3]; + var q2x = other.x, q2y = other.y, q2z = other.z, q2w = other.w; + this.x = q1x * q2w + q1w * q2x + q1y * q2z - q1z * q2y; + this.y = q1y * q2w + q1w * q2y + q1z * q2x - q1x * q2z; + this.z = q1z * q2w + q1w * q2z + q1x * q2y - q1y * q2x; + this.w = q1w * q2w - q1x * q2x - q1y * q2y - q1z * q2z; + return this; + }; + quat.prototype.multiplyVec3 = function (vector, dest) { + if (dest === void 0) { dest = null = null; } + if (!dest) { + dest = new TSM.vec3(); + } + var x = vector.x, y = vector.y, z = vector.z; + var qx = this.x, qy = this.y, qz = this.z, qw = this.w; + var ix = qw * x + qy * z - qz * y, iy = qw * y + qz * x - qx * z, iz = qw * z + qx * y - qy * x, iw = -qx * x - qy * y - qz * z; + dest.x = ix * qw + iw * -qx + iy * -qz - iz * -qy; + dest.y = iy * qw + iw * -qy + iz * -qx - ix * -qz; + dest.z = iz * qw + iw * -qz + ix * -qy - iy * -qx; + return dest; + }; + quat.prototype.toMat3 = function (dest) { + if (dest === void 0) { dest = null = null; } + if (!dest) { + dest = new TSM.mat3(); + } + var x = this.x, y = this.y, z = this.z, w = this.w; + var x2 = x + x, y2 = y + y, z2 = z + z; + var xx = x * x2, xy = x * y2, xz = x * z2, yy = y * y2, yz = y * z2, zz = z * z2, wx = w * x2, wy = w * y2, wz = w * z2; + dest.init([ + 1 - (yy + zz), + xy + wz, + xz - wy, + xy - wz, + 1 - (xx + zz), + yz + wx, + xz + wy, + yz - wx, + 1 - (xx + yy) + ]); + return dest; + }; + quat.prototype.toMat4 = function (dest) { + if (dest === void 0) { dest = null = null; } + if (!dest) { + dest = new TSM.mat4(); + } + var x = this.x, y = this.y, z = this.z, w = this.w, x2 = x + x, y2 = y + y, z2 = z + z, xx = x * x2, xy = x * y2, xz = x * z2, yy = y * y2, yz = y * z2, zz = z * z2, wx = w * x2, wy = w * y2, wz = w * z2; + dest.init([ + 1 - (yy + zz), + xy + wz, + xz - wy, + 0, + xy - wz, + 1 - (xx + zz), + yz + wx, + 0, + xz + wy, + yz - wx, + 1 - (xx + yy), + 0, + 0, + 0, + 0, + 1 + ]); + return dest; + }; + quat.identity = new quat().setIdentity(); + return quat; + })(); + TSM.quat = quat; +})(TSM || (TSM = {})); diff --git a/lib/tsm/quat.ts b/lib/tsm/quat.ts index 6856afa..925ac3a 100644 --- a/lib/tsm/quat.ts +++ b/lib/tsm/quat.ts @@ -32,610 +32,608 @@ /// +import {mat4} from './mat4'; +import {mat3} from './mat3'; +import {vec3} from './vec3'; -module TSM +export class quat { + static identity = new quat().setIdentity(); - export class quat + private values = new Float32Array(4); + + static dot(q1: quat, q2: quat): number { - static identity = new quat().setIdentity(); + return q1.x * q2.x + q1.y * q2.y + q1.z * q2.z + q1.w * q2.w; + } - private values = new Float32Array(4); - - static dot(q1: quat, q2: quat): number + static sum(q1: quat, q2: quat, dest: quat | null = null): quat + { + if (!dest) { - return q1.x * q2.x + q1.y * q2.y + q1.z * q2.z + q1.w * q2.w; + dest = new quat(); } - static sum(q1: quat, q2: quat, dest: quat | null = null): quat - { - if (!dest) - { - dest = new quat(); - } + dest.x = q1.x + q2.x; + dest.y = q1.y + q2.y; + dest.z = q1.z + q2.z; + dest.w = q1.w + q2.w; - dest.x = q1.x + q2.x; - dest.y = q1.y + q2.y; - dest.z = q1.z + q2.z; - dest.w = q1.w + q2.w; + return dest; + } + + static product(q1: quat, q2: quat, dest: quat | null = null): quat + { + if (!dest) + { + dest = new quat(); + } + + const q1x = q1.x, + q1y = q1.y, + q1z = q1.z, + q1w = q1.w, + + q2x = q2.x, + q2y = q2.y, + q2z = q2.z, + q2w = q2.w; + + dest.x = q1x * q2w + q1w * q2x + q1y * q2z - q1z * q2y; + dest.y = q1y * q2w + q1w * q2y + q1z * q2x - q1x * q2z; + dest.z = q1z * q2w + q1w * q2z + q1x * q2y - q1y * q2x; + dest.w = q1w * q2w - q1x * q2x - q1y * q2y - q1z * q2z; + + return dest; + } + + static cross(q1: quat, q2: quat, dest: quat | null = null): quat + { + if (!dest) + { + dest = new quat(); + } + + const q1x = q1.x, + q1y = q1.y, + q1z = q1.z, + q1w = q1.w, + + q2x = q2.x, + q2y = q2.y, + q2z = q2.z, + q2w = q2.w; + + dest.x = q1w * q2z + q1z * q2w + q1x * q2y - q1y * q2x; + dest.y = q1w * q2w - q1x * q2x - q1y * q2y - q1z * q2z; + dest.z = q1w * q2x + q1x * q2w + q1y * q2z - q1z * q2y; + dest.w = q1w * q2y + q1y * q2w + q1z * q2x - q1x * q2z; + + return dest; + } + + static shortMix(q1: quat, q2: quat, time: number, dest: quat | null = null): quat + { + if (!dest) + { + dest = new quat(); + } + + if (time <= 0.0) + { + dest.xyzw = q1.xyzw; + + return dest; + } + else if (time >= 1.0) + { + dest.xyzw = q2.xyzw; return dest; } - static product(q1: quat, q2: quat, dest: quat | null = null): quat + let cos = quat.dot(q1, q2); + const q2a = q2.copy(); + + if (cos < 0.0) { - if (!dest) - { - dest = new quat(); - } + q2a.inverse(); + cos = -cos; + } - const q1x = q1.x, - q1y = q1.y, - q1z = q1.z, - q1w = q1.w, + let k0: number, + k1: number; - q2x = q2.x, - q2y = q2.y, - q2z = q2.z, - q2w = q2.w; + if (cos > 0.9999) + { + k0 = 1 - time; + k1 = time; + } + else + { + const sin: number = Math.sqrt(1 - cos * cos); + const angle: number = Math.atan2(sin, cos); - dest.x = q1x * q2w + q1w * q2x + q1y * q2z - q1z * q2y; - dest.y = q1y * q2w + q1w * q2y + q1z * q2x - q1x * q2z; - dest.z = q1z * q2w + q1w * q2z + q1x * q2y - q1y * q2x; - dest.w = q1w * q2w - q1x * q2x - q1y * q2y - q1z * q2z; + const oneOverSin: number = 1 / sin; + + k0 = Math.sin((1 - time) * angle) * oneOverSin; + k1 = Math.sin((time) * angle) * oneOverSin; + } + + dest.x = k0 * q1.x + k1 * q2a.x; + dest.y = k0 * q1.y + k1 * q2a.y; + dest.z = k0 * q1.z + k1 * q2a.z; + dest.w = k0 * q1.w + k1 * q2a.w; + + return dest; + } + + static mix(q1: quat, q2: quat, time: number, dest: quat | null = null): quat + { + if (!dest) + { + dest = new quat(); + } + + const cosHalfTheta = q1.x * q2.x + q1.y * q2.y + q1.z * q2.z + q1.w * q2.w; + + if (Math.abs(cosHalfTheta) >= 1.0) + { + dest.xyzw = q1.xyzw; return dest; } - static cross(q1: quat, q2: quat, dest: quat | null = null): quat + const halfTheta = Math.acos(cosHalfTheta), + sinHalfTheta = Math.sqrt(1.0 - cosHalfTheta * cosHalfTheta); + + if (Math.abs(sinHalfTheta) < 0.001) { - if (!dest) - { - dest = new quat(); - } - - const q1x = q1.x, - q1y = q1.y, - q1z = q1.z, - q1w = q1.w, - - q2x = q2.x, - q2y = q2.y, - q2z = q2.z, - q2w = q2.w; - - dest.x = q1w * q2z + q1z * q2w + q1x * q2y - q1y * q2x; - dest.y = q1w * q2w - q1x * q2x - q1y * q2y - q1z * q2z; - dest.z = q1w * q2x + q1x * q2w + q1y * q2z - q1z * q2y; - dest.w = q1w * q2y + q1y * q2w + q1z * q2x - q1x * q2z; + dest.x = q1.x * 0.5 + q2.x * 0.5; + dest.y = q1.y * 0.5 + q2.y * 0.5; + dest.z = q1.z * 0.5 + q2.z * 0.5; + dest.w = q1.w * 0.5 + q2.w * 0.5; return dest; } - static shortMix(q1: quat, q2: quat, time: number, dest: quat | null = null): quat + const ratioA = Math.sin((1 - time) * halfTheta) / sinHalfTheta, + ratioB = Math.sin(time * halfTheta) / sinHalfTheta; + + dest.x = q1.x * ratioA + q2.x * ratioB; + dest.y = q1.y * ratioA + q2.y * ratioB; + dest.z = q1.z * ratioA + q2.z * ratioB; + dest.w = q1.w * ratioA + q2.w * ratioB; + + return dest; + } + + static fromAxis(axis: vec3, angle: number, dest: quat | null = null): quat + { + if (!dest) { - if (!dest) - { - dest = new quat(); - } - - if (time <= 0.0) - { - dest.xyzw = q1.xyzw; - - return dest; - } - else if (time >= 1.0) - { - dest.xyzw = q2.xyzw; - - return dest; - } - - let cos = quat.dot(q1, q2); - const q2a = q2.copy(); - - if (cos < 0.0) - { - q2a.inverse(); - cos = -cos; - } - - let k0: number, - k1: number; - - if (cos > 0.9999) - { - k0 = 1 - time; - k1 = time; - } - else - { - const sin: number = Math.sqrt(1 - cos * cos); - const angle: number = Math.atan2(sin, cos); - - const oneOverSin: number = 1 / sin; - - k0 = Math.sin((1 - time) * angle) * oneOverSin; - k1 = Math.sin((time) * angle) * oneOverSin; - } - - dest.x = k0 * q1.x + k1 * q2a.x; - dest.y = k0 * q1.y + k1 * q2a.y; - dest.z = k0 * q1.z + k1 * q2a.z; - dest.w = k0 * q1.w + k1 * q2a.w; - - return dest; + dest = new quat(); } - static mix(q1: quat, q2: quat, time: number, dest: quat | null = null): quat + angle *= 0.5; + const sin = Math.sin(angle); + + dest.x = axis.x * sin; + dest.y = axis.y * sin; + dest.z = axis.z * sin; + dest.w = Math.cos(angle); + + return dest; + } + + get x(): number + { + return this.values[0]; + } + + get y(): number + { + return this.values[1]; + } + + get z(): number + { + return this.values[2]; + } + + get w(): number + { + return this.values[3]; + } + + get xy(): number[] + { + return [ + this.values[0], + this.values[1] + ]; + } + + get xyz(): number[] + { + return [ + this.values[0], + this.values[1], + this.values[2] + ]; + } + + get xyzw(): number[] + { + return [ + this.values[0], + this.values[1], + this.values[2], + this.values[3] + ]; + } + + set x(value: number) + { + this.values[0] = value; + } + + set y(value: number) + { + this.values[1] = value; + } + + set z(value: number) + { + this.values[2] = value; + } + + set w(value: number) + { + this.values[3] = value; + } + + set xy(values: number[]) + { + this.values[0] = values[0]; + this.values[1] = values[1]; + } + + set xyz(values: number[]) + { + this.values[0] = values[0]; + this.values[1] = values[1]; + this.values[2] = values[2]; + } + + set xyzw(values: number[]) + { + this.values[0] = values[0]; + this.values[1] = values[1]; + this.values[2] = values[2]; + this.values[3] = values[3]; + } + + constructor(values: number[] | null = null) + { + if (values) { - if (!dest) - { - dest = new quat(); - } - - const cosHalfTheta = q1.x * q2.x + q1.y * q2.y + q1.z * q2.z + q1.w * q2.w; - - if (Math.abs(cosHalfTheta) >= 1.0) - { - dest.xyzw = q1.xyzw; - - return dest; - } - - const halfTheta = Math.acos(cosHalfTheta), - sinHalfTheta = Math.sqrt(1.0 - cosHalfTheta * cosHalfTheta); - - if (Math.abs(sinHalfTheta) < 0.001) - { - dest.x = q1.x * 0.5 + q2.x * 0.5; - dest.y = q1.y * 0.5 + q2.y * 0.5; - dest.z = q1.z * 0.5 + q2.z * 0.5; - dest.w = q1.w * 0.5 + q2.w * 0.5; - - return dest; - } - - const ratioA = Math.sin((1 - time) * halfTheta) / sinHalfTheta, - ratioB = Math.sin(time * halfTheta) / sinHalfTheta; - - dest.x = q1.x * ratioA + q2.x * ratioB; - dest.y = q1.y * ratioA + q2.y * ratioB; - dest.z = q1.z * ratioA + q2.z * ratioB; - dest.w = q1.w * ratioA + q2.w * ratioB; - - return dest; - } - - static fromAxis(axis: vec3, angle: number, dest: quat | null = null): quat - { - if (!dest) - { - dest = new quat(); - } - - angle *= 0.5; - const sin = Math.sin(angle); - - dest.x = axis.x * sin; - dest.y = axis.y * sin; - dest.z = axis.z * sin; - dest.w = Math.cos(angle); - - return dest; - } - - get x(): number - { - return this.values[0]; - } - - get y(): number - { - return this.values[1]; - } - - get z(): number - { - return this.values[2]; - } - - get w(): number - { - return this.values[3]; - } - - get xy(): number[] - { - return [ - this.values[0], - this.values[1] - ]; - } - - get xyz(): number[] - { - return [ - this.values[0], - this.values[1], - this.values[2] - ]; - } - - get xyzw(): number[] - { - return [ - this.values[0], - this.values[1], - this.values[2], - this.values[3] - ]; - } - - set x(value: number) - { - this.values[0] = value; - } - - set y(value: number) - { - this.values[1] = value; - } - - set z(value: number) - { - this.values[2] = value; - } - - set w(value: number) - { - this.values[3] = value; - } - - set xy(values: number[]) - { - this.values[0] = values[0]; - this.values[1] = values[1]; - } - - set xyz(values: number[]) - { - this.values[0] = values[0]; - this.values[1] = values[1]; - this.values[2] = values[2]; - } - - set xyzw(values: number[]) - { - this.values[0] = values[0]; - this.values[1] = values[1]; - this.values[2] = values[2]; - this.values[3] = values[3]; - } - - constructor(values: number[] | null = null) - { - if (values) - { - this.xyzw = values; - } - } - - at(index: number): number - { - return this.values[index]; - } - - reset(): void - { - for (let i = 0; i < 4; i++) - { - this.values[i] = 0; - } - } - - copy(dest: quat | null = null): quat - { - if (!dest) - { - dest = new quat(); - } - - for (let i = 0; i < 4; i++) - { - dest.values[i] = this.values[i]; - } - - return dest; - } - - roll(): number - { - const x = this.x, - y = this.y, - z = this.z, - w = this.w; - - return Math.atan2(2.0 * (x * y + w * z), w * w + x * x - y * y - z * z); - } - - pitch(): number - { - const x = this.x, - y = this.y, - z = this.z, - w = this.w; - - return Math.atan2(2.0 * (y * z + w * x), w * w - x * x - y * y + z * z); - } - - yaw(): number - { - return Math.asin(2.0 * (this.x * this.z - this.w * this.y)); - } - - equals(vector: quat, threshold = EPSILON): boolean - { - for (let i = 0; i < 4; i++) - { - if (Math.abs(this.values[i] - vector.at(i)) > threshold) - { - return false; - } - } - - return true; - } - - setIdentity(): quat - { - this.x = 0; - this.y = 0; - this.z = 0; - this.w = 1; - - return this; - } - - calculateW(): quat - { - const x = this.x, - y = this.y, - z = this.z; - - this.w = -(Math.sqrt(Math.abs(1.0 - x * x - y * y - z * z))); - - return this; - } - - inverse(): quat - { - const dot = quat.dot(this, this); - - if (!dot) - { - this.xyzw = [0, 0, 0, 0]; - - return this; - } - - const invDot = dot ? 1.0 / dot : 0; - - this.x *= -invDot; - this.y *= -invDot; - this.z *= -invDot; - this.w *= invDot; - - return this; - } - - conjugate(): quat - { - this.values[0] *= -1; - this.values[1] *= -1; - this.values[2] *= -1; - - return this; - } - - length(): number - { - const x = this.x, - y = this.y, - z = this.z, - w = this.w; - - return Math.sqrt(x * x + y * y + z * z + w * w); - } - - normalize(dest: quat | null = null): quat - { - if (!dest) - { - dest = this; - } - - const x = this.x, - y = this.y, - z = this.z, - w = this.w; - - let length = Math.sqrt(x * x + y * y + z * z + w * w); - - if (!length) - { - dest.x = 0; - dest.y = 0; - dest.z = 0; - dest.w = 0; - - return dest; - } - - length = 1 / length; - - dest.x = x * length; - dest.y = y * length; - dest.z = z * length; - dest.w = w * length; - - return dest; - } - - add(other: quat): quat - { - for (let i = 0; i < 4; i++) - { - this.values[i] += other.at(i); - } - - return this; - } - - multiply(other: quat): quat - { - const q1x = this.values[0], - q1y = this.values[1], - q1z = this.values[2], - q1w = this.values[3]; - - const q2x = other.x, - q2y = other.y, - q2z = other.z, - q2w = other.w; - - this.x = q1x * q2w + q1w * q2x + q1y * q2z - q1z * q2y; - this.y = q1y * q2w + q1w * q2y + q1z * q2x - q1x * q2z; - this.z = q1z * q2w + q1w * q2z + q1x * q2y - q1y * q2x; - this.w = q1w * q2w - q1x * q2x - q1y * q2y - q1z * q2z; - - return this; - } - - multiplyVec3(vector: vec3, dest: vec3 | null = null): vec3 - { - if (!dest) - { - dest = new vec3(); - } - - const x = vector.x, - y = vector.y, - z = vector.z; - - const qx = this.x, - qy = this.y, - qz = this.z, - qw = this.w; - - const ix = qw * x + qy * z - qz * y, - iy = qw * y + qz * x - qx * z, - iz = qw * z + qx * y - qy * x, - iw = -qx * x - qy * y - qz * z; - - dest.x = ix * qw + iw * -qx + iy * -qz - iz * -qy; - dest.y = iy * qw + iw * -qy + iz * -qx - ix * -qz; - dest.z = iz * qw + iw * -qz + ix * -qy - iy * -qx; - - return dest; - } - - toMat3(dest: mat3 | null = null): mat3 - { - if (!dest) - { - dest = new mat3(); - } - - const x = this.x, - y = this.y, - z = this.z, - w = this.w; - - const x2 = x + x, - y2 = y + y, - z2 = z + z; - - const xx = x * x2, - xy = x * y2, - xz = x * z2, - yy = y * y2, - yz = y * z2, - zz = z * z2, - wx = w * x2, - wy = w * y2, - wz = w * z2; - - dest.init([ - 1 - (yy + zz), - xy + wz, - xz - wy, - - xy - wz, - 1 - (xx + zz), - yz + wx, - - xz + wy, - yz - wx, - 1 - (xx + yy) - ]); - - return dest; - } - - toMat4(dest: mat4 | null = null): mat4 - { - if (!dest) - { - dest = new mat4(); - } - - const x = this.x, - y = this.y, - z = this.z, - w = this.w, - - x2 = x + x, - y2 = y + y, - z2 = z + z, - - xx = x * x2, - xy = x * y2, - xz = x * z2, - yy = y * y2, - yz = y * z2, - zz = z * z2, - wx = w * x2, - wy = w * y2, - wz = w * z2; - - dest.init([ - 1 - (yy + zz), - xy + wz, - xz - wy, - 0, - - xy - wz, - 1 - (xx + zz), - yz + wx, - 0, - - xz + wy, - yz - wx, - 1 - (xx + yy), - 0, - - 0, - 0, - 0, - 1 - ]); - - return dest; + this.xyzw = values; } } + at(index: number): number + { + return this.values[index]; + } + + reset(): void + { + for (let i = 0; i < 4; i++) + { + this.values[i] = 0; + } + } + + copy(dest: quat | null = null): quat + { + if (!dest) + { + dest = new quat(); + } + + for (let i = 0; i < 4; i++) + { + dest.values[i] = this.values[i]; + } + + return dest; + } + + roll(): number + { + const x = this.x, + y = this.y, + z = this.z, + w = this.w; + + return Math.atan2(2.0 * (x * y + w * z), w * w + x * x - y * y - z * z); + } + + pitch(): number + { + const x = this.x, + y = this.y, + z = this.z, + w = this.w; + + return Math.atan2(2.0 * (y * z + w * x), w * w - x * x - y * y + z * z); + } + + yaw(): number + { + return Math.asin(2.0 * (this.x * this.z - this.w * this.y)); + } + + equals(vector: quat, threshold = EPSILON): boolean + { + for (let i = 0; i < 4; i++) + { + if (Math.abs(this.values[i] - vector.at(i)) > threshold) + { + return false; + } + } + + return true; + } + + setIdentity(): quat + { + this.x = 0; + this.y = 0; + this.z = 0; + this.w = 1; + + return this; + } + + calculateW(): quat + { + const x = this.x, + y = this.y, + z = this.z; + + this.w = -(Math.sqrt(Math.abs(1.0 - x * x - y * y - z * z))); + + return this; + } + + inverse(): quat + { + const dot = quat.dot(this, this); + + if (!dot) + { + this.xyzw = [0, 0, 0, 0]; + + return this; + } + + const invDot = dot ? 1.0 / dot : 0; + + this.x *= -invDot; + this.y *= -invDot; + this.z *= -invDot; + this.w *= invDot; + + return this; + } + + conjugate(): quat + { + this.values[0] *= -1; + this.values[1] *= -1; + this.values[2] *= -1; + + return this; + } + + length(): number + { + const x = this.x, + y = this.y, + z = this.z, + w = this.w; + + return Math.sqrt(x * x + y * y + z * z + w * w); + } + + normalize(dest: quat | null = null): quat + { + if (!dest) + { + dest = this; + } + + const x = this.x, + y = this.y, + z = this.z, + w = this.w; + + let length = Math.sqrt(x * x + y * y + z * z + w * w); + + if (!length) + { + dest.x = 0; + dest.y = 0; + dest.z = 0; + dest.w = 0; + + return dest; + } + + length = 1 / length; + + dest.x = x * length; + dest.y = y * length; + dest.z = z * length; + dest.w = w * length; + + return dest; + } + + add(other: quat): quat + { + for (let i = 0; i < 4; i++) + { + this.values[i] += other.at(i); + } + + return this; + } + + multiply(other: quat): quat + { + const q1x = this.values[0], + q1y = this.values[1], + q1z = this.values[2], + q1w = this.values[3]; + + const q2x = other.x, + q2y = other.y, + q2z = other.z, + q2w = other.w; + + this.x = q1x * q2w + q1w * q2x + q1y * q2z - q1z * q2y; + this.y = q1y * q2w + q1w * q2y + q1z * q2x - q1x * q2z; + this.z = q1z * q2w + q1w * q2z + q1x * q2y - q1y * q2x; + this.w = q1w * q2w - q1x * q2x - q1y * q2y - q1z * q2z; + + return this; + } + + multiplyVec3(vector: vec3, dest: vec3 | null = null): vec3 + { + if (!dest) + { + dest = new vec3(); + } + + const x = vector.x, + y = vector.y, + z = vector.z; + + const qx = this.x, + qy = this.y, + qz = this.z, + qw = this.w; + + const ix = qw * x + qy * z - qz * y, + iy = qw * y + qz * x - qx * z, + iz = qw * z + qx * y - qy * x, + iw = -qx * x - qy * y - qz * z; + + dest.x = ix * qw + iw * -qx + iy * -qz - iz * -qy; + dest.y = iy * qw + iw * -qy + iz * -qx - ix * -qz; + dest.z = iz * qw + iw * -qz + ix * -qy - iy * -qx; + + return dest; + } + + toMat3(dest: mat3 | null = null): mat3 + { + if (!dest) + { + dest = new mat3(); + } + + const x = this.x, + y = this.y, + z = this.z, + w = this.w; + + const x2 = x + x, + y2 = y + y, + z2 = z + z; + + const xx = x * x2, + xy = x * y2, + xz = x * z2, + yy = y * y2, + yz = y * z2, + zz = z * z2, + wx = w * x2, + wy = w * y2, + wz = w * z2; + + dest.init([ + 1 - (yy + zz), + xy + wz, + xz - wy, + + xy - wz, + 1 - (xx + zz), + yz + wx, + + xz + wy, + yz - wx, + 1 - (xx + yy) + ]); + + return dest; + } + + toMat4(dest: mat4 | null = null): mat4 + { + if (!dest) + { + dest = new mat4(); + } + + const x = this.x, + y = this.y, + z = this.z, + w = this.w, + + x2 = x + x, + y2 = y + y, + z2 = z + z, + + xx = x * x2, + xy = x * y2, + xz = x * z2, + yy = y * y2, + yz = y * z2, + zz = z * z2, + wx = w * x2, + wy = w * y2, + wz = w * z2; + + dest.init([ + 1 - (yy + zz), + xy + wz, + xz - wy, + 0, + + xy - wz, + 1 - (xx + zz), + yz + wx, + 0, + + xz + wy, + yz - wx, + 1 - (xx + yy), + 0, + + 0, + 0, + 0, + 1 + ]); + + return dest; + } } diff --git a/lib/tsm/tsm.js b/lib/tsm/tsm.js new file mode 100644 index 0000000..53c6d43 --- /dev/null +++ b/lib/tsm/tsm.js @@ -0,0 +1,36 @@ +/** + * @fileoverview TSM - A TypeScript vector and matrix math library + * @author Matthias Ferch + * @version 0.6 + */ +/* + * Copyright (c) 2012 Matthias Ferch + * + * Project homepage: https://github.com/matthiasferch/tsm + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * + * 2. Altered source versions must be plainly marked as such, and must not + * be misrepresented as being the original software. + * + * 3. This notice may not be removed or altered from any source + * distribution. + */ +/// +/// +/// +/// +/// +/// +/// diff --git a/lib/tsm/vec2.js b/lib/tsm/vec2.js new file mode 100644 index 0000000..ea3c099 --- /dev/null +++ b/lib/tsm/vec2.js @@ -0,0 +1,265 @@ +/* + * Copyright (c) 2012 Matthias Ferch + * + * Project homepage: https://github.com/matthiasferch/tsm + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * + * 2. Altered source versions must be plainly marked as such, and must not + * be misrepresented as being the original software. + * + * 3. This notice may not be removed or altered from any source + * distribution. + */ +/// +var TSM; +(function (TSM) { + var vec2 = (function () { + function vec2(values) { + if (values === void 0) { values = null = null; } + this.values = new Float32Array(2); + if (values) { + this.xy = values; + } + } + vec2.cross = function (vector, vector2, dest) { + if (dest === void 0) { dest = null = null; } + if (!dest) { + dest = new TSM.vec3(); + } + var x = vector.x, y = vector.y; + var x2 = vector2.x, y2 = vector2.y; + var z = x * y2 - y * x2; + dest.x = 0; + dest.y = 0; + dest.z = z; + return dest; + }; + vec2.dot = function (vector, vector2) { + return (vector.x * vector2.x + vector.y * vector2.y); + }; + vec2.distance = function (vector, vector2) { + return Math.sqrt(this.squaredDistance(vector, vector2)); + }; + vec2.squaredDistance = function (vector, vector2) { + var x = vector2.x - vector.x, y = vector2.y - vector.y; + return (x * x + y * y); + }; + vec2.direction = function (vector, vector2, dest) { + if (dest === void 0) { dest = null = null; } + if (!dest) { + dest = new vec2(); + } + var x = vector.x - vector2.x, y = vector.y - vector2.y; + var length = Math.sqrt(x * x + y * y); + if (length === 0) { + dest.x = 0; + dest.y = 0; + return dest; + } + length = 1 / length; + dest.x = x * length; + dest.y = y * length; + return dest; + }; + vec2.mix = function (vector, vector2, time, dest) { + if (dest === void 0) { dest = null = null; } + if (!dest) { + dest = new vec2(); + } + var x = vector.x, y = vector.y; + var x2 = vector2.x, y2 = vector2.y; + dest.x = x + time * (x2 - x); + dest.y = y + time * (y2 - y); + return dest; + }; + vec2.sum = function (vector, vector2, dest) { + if (dest === void 0) { dest = null = null; } + if (!dest) { + dest = new vec2(); + } + dest.x = vector.x + vector2.x; + dest.y = vector.y + vector2.y; + return dest; + }; + vec2.difference = function (vector, vector2, dest) { + if (dest === void 0) { dest = null = null; } + if (!dest) { + dest = new vec2(); + } + dest.x = vector.x - vector2.x; + dest.y = vector.y - vector2.y; + return dest; + }; + vec2.product = function (vector, vector2, dest) { + if (dest === void 0) { dest = null = null; } + if (!dest) { + dest = new vec2(); + } + dest.x = vector.x * vector2.x; + dest.y = vector.y * vector2.y; + return dest; + }; + vec2.quotient = function (vector, vector2, dest) { + if (dest === void 0) { dest = null = null; } + if (!dest) { + dest = new vec2(); + } + dest.x = vector.x / vector2.x; + dest.y = vector.y / vector2.y; + return dest; + }; + Object.defineProperty(vec2.prototype, "x", { + get: function () { + return this.values[0]; + }, + set: function (value) { + this.values[0] = value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(vec2.prototype, "y", { + get: function () { + return this.values[1]; + }, + set: function (value) { + this.values[1] = value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(vec2.prototype, "xy", { + get: function () { + return [ + this.values[0], + this.values[1] + ]; + }, + set: function (values) { + this.values[0] = values[0]; + this.values[1] = values[1]; + }, + enumerable: true, + configurable: true + }); + vec2.prototype.at = function (index) { + return this.values[index]; + }; + vec2.prototype.reset = function () { + this.x = 0; + this.y = 0; + }; + vec2.prototype.copy = function (dest) { + if (dest === void 0) { dest = null = null; } + if (!dest) { + dest = new vec2(); + } + dest.x = this.x; + dest.y = this.y; + return dest; + }; + vec2.prototype.negate = function (dest) { + if (dest === void 0) { dest = null = null; } + if (!dest) { + dest = this; + } + dest.x = -this.x; + dest.y = -this.y; + return dest; + }; + vec2.prototype.equals = function (vector, threshold) { + if (threshold === void 0) { threshold = EPSILON; } + if (Math.abs(this.x - vector.x) > threshold) { + return false; + } + if (Math.abs(this.y - vector.y) > threshold) { + return false; + } + return true; + }; + vec2.prototype.length = function () { + return Math.sqrt(this.squaredLength()); + }; + vec2.prototype.squaredLength = function () { + var x = this.x, y = this.y; + return (x * x + y * y); + }; + vec2.prototype.add = function (vector) { + this.x += vector.x; + this.y += vector.y; + return this; + }; + vec2.prototype.subtract = function (vector) { + this.x -= vector.x; + this.y -= vector.y; + return this; + }; + vec2.prototype.multiply = function (vector) { + this.x *= vector.x; + this.y *= vector.y; + return this; + }; + vec2.prototype.divide = function (vector) { + this.x /= vector.x; + this.y /= vector.y; + return this; + }; + vec2.prototype.scale = function (value, dest) { + if (dest === void 0) { dest = null = null; } + if (!dest) { + dest = this; + } + dest.x *= value; + dest.y *= value; + return dest; + }; + vec2.prototype.normalize = function (dest) { + if (dest === void 0) { dest = null = null; } + if (!dest) { + dest = this; + } + var length = this.length(); + if (length === 1) { + return this; + } + if (length === 0) { + dest.x = 0; + dest.y = 0; + return dest; + } + length = 1.0 / length; + dest.x *= length; + dest.y *= length; + return dest; + }; + vec2.prototype.multiplyMat2 = function (matrix, dest) { + if (dest === void 0) { dest = null = null; } + if (!dest) { + dest = this; + } + return matrix.multiplyVec2(this, dest); + }; + vec2.prototype.multiplyMat3 = function (matrix, dest) { + if (dest === void 0) { dest = null = null; } + if (!dest) { + dest = this; + } + return matrix.multiplyVec2(this, dest); + }; + vec2.zero = new vec2([0, 0]); + return vec2; + })(); + TSM.vec2 = vec2; +})(TSM || (TSM = {})); diff --git a/lib/tsm/vec2.ts b/lib/tsm/vec2.ts index 2715577..340ddfb 100644 --- a/lib/tsm/vec2.ts +++ b/lib/tsm/vec2.ts @@ -26,357 +26,356 @@ /// +import {mat3} from './mat3'; +import {mat2} from './mat2'; +import {vec3} from './vec3'; -module TSM +export class vec2 { - export class vec2 + static zero = new vec2([0, 0]); + + private values = new Float32Array(2); + + static cross(vector: vec2, vector2: vec2, dest: vec3 | null = null): vec3 { - - static zero = new vec2([0, 0]); - - private values = new Float32Array(2); - - static cross(vector: vec2, vector2: vec2, dest: vec3 | null = null): vec3 + if (!dest) { - if (!dest) - { - dest = new vec3(); - } + dest = new vec3(); + } - const x = vector.x, - y = vector.y; + const x = vector.x, + y = vector.y; - const x2 = vector2.x, - y2 = vector2.y; + const x2 = vector2.x, + y2 = vector2.y; - const z = x * y2 - y * x2; + const z = x * y2 - y * x2; + dest.x = 0; + dest.y = 0; + dest.z = z; + + return dest; + } + + static dot(vector: vec2, vector2: vec2): number + { + return (vector.x * vector2.x + vector.y * vector2.y); + } + + static distance(vector: vec2, vector2: vec2): number + { + return Math.sqrt(this.squaredDistance(vector, vector2)); + } + + static squaredDistance(vector: vec2, vector2: vec2): number + { + const x = vector2.x - vector.x, + y = vector2.y - vector.y; + + return (x * x + y * y); + } + + static direction(vector: vec2, vector2: vec2, dest: vec2 | null = null): vec2 + { + if (!dest) + { + dest = new vec2(); + } + + const x = vector.x - vector2.x, + y = vector.y - vector2.y; + + let length = Math.sqrt(x * x + y * y); + + if (length === 0) + { dest.x = 0; dest.y = 0; - dest.z = z; return dest; } - static dot(vector: vec2, vector2: vec2): number + length = 1 / length; + + dest.x = x * length; + dest.y = y * length; + + return dest; + } + + static mix(vector: vec2, vector2: vec2, time: number, dest: vec2 | null = null): vec2 + { + if (!dest) { - return (vector.x * vector2.x + vector.y * vector2.y); + dest = new vec2(); } - static distance(vector: vec2, vector2: vec2): number + const x = vector.x, + y = vector.y; + + const x2 = vector2.x, + y2 = vector2.y; + + dest.x = x + time * (x2 - x); + dest.y = y + time * (y2 - y); + + return dest; + } + + static sum(vector: vec2, vector2: vec2, dest: vec2 | null = null): vec2 + { + if (!dest) { - return Math.sqrt(this.squaredDistance(vector, vector2)); + dest = new vec2(); } - static squaredDistance(vector: vec2, vector2: vec2): number - { - const x = vector2.x - vector.x, - y = vector2.y - vector.y; + dest.x = vector.x + vector2.x; + dest.y = vector.y + vector2.y; - return (x * x + y * y); + return dest; + } + + static difference(vector: vec2, vector2: vec2, dest: vec2 | null = null): vec2 + { + if (!dest) + { + dest = new vec2(); } - static direction(vector: vec2, vector2: vec2, dest: vec2 | null = null): vec2 + dest.x = vector.x - vector2.x; + dest.y = vector.y - vector2.y; + + return dest; + } + + static product(vector: vec2, vector2: vec2, dest: vec2 | null = null): vec2 + { + if (!dest) { - if (!dest) - { - dest = new vec2(); - } - - const x = vector.x - vector2.x, - y = vector.y - vector2.y; - - let length = Math.sqrt(x * x + y * y); - - if (length === 0) - { - dest.x = 0; - dest.y = 0; - - return dest; - } - - length = 1 / length; - - dest.x = x * length; - dest.y = y * length; - - return dest; + dest = new vec2(); } - static mix(vector: vec2, vector2: vec2, time: number, dest: vec2 | null = null): vec2 + dest.x = vector.x * vector2.x; + dest.y = vector.y * vector2.y; + + return dest; + } + + static quotient(vector: vec2, vector2: vec2, dest: vec2 | null = null): vec2 + { + if (!dest) { - if (!dest) - { - dest = new vec2(); - } - - const x = vector.x, - y = vector.y; - - const x2 = vector2.x, - y2 = vector2.y; - - dest.x = x + time * (x2 - x); - dest.y = y + time * (y2 - y); - - return dest; + dest = new vec2(); } - static sum(vector: vec2, vector2: vec2, dest: vec2 | null = null): vec2 + dest.x = vector.x / vector2.x; + dest.y = vector.y / vector2.y; + + return dest; + } + + get x(): number + { + return this.values[0]; + } + + get y(): number + { + return this.values[1]; + } + + get xy(): number[] + { + return [ + this.values[0], + this.values[1] + ]; + } + + set x(value: number) + { + this.values[0] = value; + } + + set y(value: number) + { + this.values[1] = value; + } + + set xy(values: number[]) + { + this.values[0] = values[0]; + this.values[1] = values[1]; + } + + constructor(values: number[] | null = null) + { + if (values) { - if (!dest) - { - dest = new vec2(); - } + this.xy = values; + } + } - dest.x = vector.x + vector2.x; - dest.y = vector.y + vector2.y; + at(index: number): number + { + return this.values[index]; + } - return dest; + reset(): void + { + this.x = 0; + this.y = 0; + } + + copy(dest: vec2 | null = null): vec2 + { + if (!dest) + { + dest = new vec2(); } - static difference(vector: vec2, vector2: vec2, dest: vec2 | null = null): vec2 + dest.x = this.x; + dest.y = this.y; + + return dest; + } + + negate(dest: vec2 | null = null): vec2 + { + if (!dest) { - if (!dest) - { - dest = new vec2(); - } - - dest.x = vector.x - vector2.x; - dest.y = vector.y - vector2.y; - - return dest; + dest = this; } - static product(vector: vec2, vector2: vec2, dest: vec2 | null = null): vec2 + dest.x = -this.x; + dest.y = -this.y; + + return dest; + } + + equals(vector: vec2, threshold = EPSILON): boolean + { + if (Math.abs(this.x - vector.x) > threshold) { - if (!dest) - { - dest = new vec2(); - } - - dest.x = vector.x * vector2.x; - dest.y = vector.y * vector2.y; - - return dest; + return false; } - static quotient(vector: vec2, vector2: vec2, dest: vec2 | null = null): vec2 + if (Math.abs(this.y - vector.y) > threshold) { - if (!dest) - { - dest = new vec2(); - } - - dest.x = vector.x / vector2.x; - dest.y = vector.y / vector2.y; - - return dest; + return false; } - get x(): number + return true; + } + + length(): number + { + return Math.sqrt(this.squaredLength()); + } + + squaredLength(): number + { + const x = this.x, + y = this.y; + + return (x * x + y * y); + } + + add(vector: vec2): vec2 + { + this.x += vector.x; + this.y += vector.y; + + return this; + } + + subtract(vector: vec2): vec2 + { + this.x -= vector.x; + this.y -= vector.y; + + return this; + } + + multiply(vector: vec2): vec2 + { + this.x *= vector.x; + this.y *= vector.y; + + return this; + } + + divide(vector: vec2): vec2 + { + this.x /= vector.x; + this.y /= vector.y; + + return this; + } + + scale(value: number, dest: vec2 | null = null): vec2 + { + if (!dest) { - return this.values[0]; + dest = this; } - get y(): number + dest.x *= value; + dest.y *= value; + + return dest; + } + + normalize(dest: vec2 | null = null): vec2 + { + if (!dest) { - return this.values[1]; + dest = this; } - get xy(): number[] + let length = this.length(); + + if (length === 1) { - return [ - this.values[0], - this.values[1] - ]; - } - - set x(value: number) - { - this.values[0] = value; - } - - set y(value: number) - { - this.values[1] = value; - } - - set xy(values: number[]) - { - this.values[0] = values[0]; - this.values[1] = values[1]; - } - - constructor(values: number[] | null = null) - { - if (values) - { - this.xy = values; - } - } - - at(index: number): number - { - return this.values[index]; - } - - reset(): void - { - this.x = 0; - this.y = 0; - } - - copy(dest: vec2 | null = null): vec2 - { - if (!dest) - { - dest = new vec2(); - } - - dest.x = this.x; - dest.y = this.y; - - return dest; - } - - negate(dest: vec2 | null = null): vec2 - { - if (!dest) - { - dest = this; - } - - dest.x = -this.x; - dest.y = -this.y; - - return dest; - } - - equals(vector: vec2, threshold = EPSILON): boolean - { - if (Math.abs(this.x - vector.x) > threshold) - { - return false; - } - - if (Math.abs(this.y - vector.y) > threshold) - { - return false; - } - - return true; - } - - length(): number - { - return Math.sqrt(this.squaredLength()); - } - - squaredLength(): number - { - const x = this.x, - y = this.y; - - return (x * x + y * y); - } - - add(vector: vec2): vec2 - { - this.x += vector.x; - this.y += vector.y; - return this; } - subtract(vector: vec2): vec2 + if (length === 0) { - this.x -= vector.x; - this.y -= vector.y; - - return this; - } - - multiply(vector: vec2): vec2 - { - this.x *= vector.x; - this.y *= vector.y; - - return this; - } - - divide(vector: vec2): vec2 - { - this.x /= vector.x; - this.y /= vector.y; - - return this; - } - - scale(value: number, dest: vec2 | null = null): vec2 - { - if (!dest) - { - dest = this; - } - - dest.x *= value; - dest.y *= value; + dest.x = 0; + dest.y = 0; return dest; } - normalize(dest: vec2 | null = null): vec2 + length = 1.0 / length; + + dest.x *= length; + dest.y *= length; + + return dest; + } + + multiplyMat2(matrix: mat2, dest: vec2 | null = null): vec2 + { + if (!dest) { - if (!dest) - { - dest = this; - } - - let length = this.length(); - - if (length === 1) - { - return this; - } - - if (length === 0) - { - dest.x = 0; - dest.y = 0; - - return dest; - } - - length = 1.0 / length; - - dest.x *= length; - dest.y *= length; - - return dest; + dest = this; } - multiplyMat2(matrix: mat2, dest: vec2 | null = null): vec2 - { - if (!dest) - { - dest = this; - } + return matrix.multiplyVec2(this, dest); + } - return matrix.multiplyVec2(this, dest); + multiplyMat3(matrix: mat3, dest: vec2 | null = null): vec2 + { + if (!dest) + { + dest = this; } - multiplyMat3(matrix: mat3, dest: vec2 | null = null): vec2 - { - if (!dest) - { - dest = this; - } - - return matrix.multiplyVec2(this, dest); - } + return matrix.multiplyVec2(this, dest); } } diff --git a/lib/tsm/vec3.js b/lib/tsm/vec3.js new file mode 100644 index 0000000..86a0e1f --- /dev/null +++ b/lib/tsm/vec3.js @@ -0,0 +1,338 @@ +/** + * @fileoverview TSM - A TypeScript vector and matrix math library + * @author Matthias Ferch + * @version 0.6 + */ +/* + * Copyright (c) 2012 Matthias Ferch + * + * Project homepage: https://github.com/matthiasferch/tsm + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * + * 2. Altered source versions must be plainly marked as such, and must not + * be misrepresented as being the original software. + * + * 3. This notice may not be removed or altered from any source + * distribution. + */ +/// +var TSM; +(function (TSM) { + var vec3 = (function () { + function vec3(values) { + if (values === void 0) { values = null = null; } + this.values = new Float32Array(3); + if (values) { + this.xyz = values; + } + } + vec3.cross = function (vector, vector2, dest) { + if (dest === void 0) { dest = null = null; } + if (!dest) { + dest = new vec3(); + } + var x = vector.x, y = vector.y, z = vector.z; + var x2 = vector2.x, y2 = vector2.y, z2 = vector2.z; + dest.x = y * z2 - z * y2; + dest.y = z * x2 - x * z2; + dest.z = x * y2 - y * x2; + return dest; + }; + vec3.dot = function (vector, vector2) { + var x = vector.x, y = vector.y, z = vector.z; + var x2 = vector2.x, y2 = vector2.y, z2 = vector2.z; + return (x * x2 + y * y2 + z * z2); + }; + vec3.distance = function (vector, vector2) { + var x = vector2.x - vector.x, y = vector2.y - vector.y, z = vector2.z - vector.z; + return Math.sqrt(this.squaredDistance(vector, vector2)); + }; + vec3.squaredDistance = function (vector, vector2) { + var x = vector2.x - vector.x, y = vector2.y - vector.y, z = vector2.z - vector.z; + return (x * x + y * y + z * z); + }; + vec3.direction = function (vector, vector2, dest) { + if (dest === void 0) { dest = null = null; } + if (!dest) { + dest = new vec3(); + } + var x = vector.x - vector2.x, y = vector.y - vector2.y, z = vector.z - vector2.z; + var length = Math.sqrt(x * x + y * y + z * z); + if (length === 0) { + dest.x = 0; + dest.y = 0; + dest.z = 0; + return dest; + } + length = 1 / length; + dest.x = x * length; + dest.y = y * length; + dest.z = z * length; + return dest; + }; + vec3.mix = function (vector, vector2, time, dest) { + if (dest === void 0) { dest = null = null; } + if (!dest) { + dest = new vec3(); + } + dest.x = vector.x + time * (vector2.x - vector.x); + dest.y = vector.y + time * (vector2.y - vector.y); + dest.z = vector.z + time * (vector2.z - vector.z); + return dest; + }; + vec3.sum = function (vector, vector2, dest) { + if (dest === void 0) { dest = null = null; } + if (!dest) { + dest = new vec3(); + } + dest.x = vector.x + vector2.x; + dest.y = vector.y + vector2.y; + dest.z = vector.z + vector2.z; + return dest; + }; + vec3.difference = function (vector, vector2, dest) { + if (dest === void 0) { dest = null = null; } + if (!dest) { + dest = new vec3(); + } + dest.x = vector.x - vector2.x; + dest.y = vector.y - vector2.y; + dest.z = vector.z - vector2.z; + return dest; + }; + vec3.product = function (vector, vector2, dest) { + if (dest === void 0) { dest = null = null; } + if (!dest) { + dest = new vec3(); + } + dest.x = vector.x * vector2.x; + dest.y = vector.y * vector2.y; + dest.z = vector.z * vector2.z; + return dest; + }; + vec3.quotient = function (vector, vector2, dest) { + if (dest === void 0) { dest = null = null; } + if (!dest) { + dest = new vec3(); + } + dest.x = vector.x / vector2.x; + dest.y = vector.y / vector2.y; + dest.z = vector.z / vector2.z; + return dest; + }; + Object.defineProperty(vec3.prototype, "x", { + get: function () { + return this.values[0]; + }, + set: function (value) { + this.values[0] = value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(vec3.prototype, "y", { + get: function () { + return this.values[1]; + }, + set: function (value) { + this.values[1] = value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(vec3.prototype, "z", { + get: function () { + return this.values[2]; + }, + set: function (value) { + this.values[2] = value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(vec3.prototype, "xy", { + get: function () { + return [ + this.values[0], + this.values[1] + ]; + }, + set: function (values) { + this.values[0] = values[0]; + this.values[1] = values[1]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(vec3.prototype, "xyz", { + get: function () { + return [ + this.values[0], + this.values[1], + this.values[2] + ]; + }, + set: function (values) { + this.values[0] = values[0]; + this.values[1] = values[1]; + this.values[2] = values[2]; + }, + enumerable: true, + configurable: true + }); + vec3.prototype.at = function (index) { + return this.values[index]; + }; + vec3.prototype.reset = function () { + this.x = 0; + this.y = 0; + this.z = 0; + }; + vec3.prototype.copy = function (dest) { + if (dest === void 0) { dest = null = null; } + if (!dest) { + dest = new vec3(); + } + dest.x = this.x; + dest.y = this.y; + dest.z = this.z; + return dest; + }; + vec3.prototype.negate = function (dest) { + if (dest === void 0) { dest = null = null; } + if (!dest) { + dest = this; + } + dest.x = -this.x; + dest.y = -this.y; + dest.z = -this.z; + return dest; + }; + vec3.prototype.equals = function (vector, threshold) { + if (threshold === void 0) { threshold = EPSILON; } + if (Math.abs(this.x - vector.x) > threshold) { + return false; + } + if (Math.abs(this.y - vector.y) > threshold) { + return false; + } + if (Math.abs(this.z - vector.z) > threshold) { + return false; + } + return true; + }; + vec3.prototype.length = function () { + return Math.sqrt(this.squaredLength()); + }; + vec3.prototype.squaredLength = function () { + var x = this.x, y = this.y, z = this.z; + return (x * x + y * y + z * z); + }; + vec3.prototype.add = function (vector) { + this.x += vector.x; + this.y += vector.y; + this.z += vector.z; + return this; + }; + vec3.prototype.subtract = function (vector) { + this.x -= vector.x; + this.y -= vector.y; + this.z -= vector.z; + return this; + }; + vec3.prototype.multiply = function (vector) { + this.x *= vector.x; + this.y *= vector.y; + this.z *= vector.z; + return this; + }; + vec3.prototype.divide = function (vector) { + this.x /= vector.x; + this.y /= vector.y; + this.z /= vector.z; + return this; + }; + vec3.prototype.scale = function (value, dest) { + if (dest === void 0) { dest = null = null; } + if (!dest) { + dest = this; + } + dest.x *= value; + dest.y *= value; + dest.z *= value; + return dest; + }; + vec3.prototype.normalize = function (dest) { + if (dest === void 0) { dest = null = null; } + if (!dest) { + dest = this; + } + var length = this.length(); + if (length === 1) { + return this; + } + if (length === 0) { + dest.x = 0; + dest.y = 0; + dest.z = 0; + return dest; + } + length = 1.0 / length; + dest.x *= length; + dest.y *= length; + dest.z *= length; + return dest; + }; + vec3.prototype.multiplyByMat3 = function (matrix, dest) { + if (dest === void 0) { dest = null = null; } + if (!dest) { + dest = this; + } + return matrix.multiplyVec3(this, dest); + }; + vec3.prototype.multiplyByQuat = function (quat, dest) { + if (dest === void 0) { dest = null = null; } + if (!dest) { + dest = this; + } + return quat.multiplyVec3(this, dest); + }; + vec3.prototype.toQuat = function (dest) { + if (dest === void 0) { dest = null = null; } + if (!dest) { + dest = new TSM.quat(); + } + var c = new vec3(); + var s = new vec3(); + c.x = Math.cos(this.x * 0.5); + s.x = Math.sin(this.x * 0.5); + c.y = Math.cos(this.y * 0.5); + s.y = Math.sin(this.y * 0.5); + c.z = Math.cos(this.z * 0.5); + s.z = Math.sin(this.z * 0.5); + dest.x = s.x * c.y * c.z - c.x * s.y * s.z; + dest.y = c.x * s.y * c.z + s.x * c.y * s.z; + dest.z = c.x * c.y * s.z - s.x * s.y * c.z; + dest.w = c.x * c.y * c.z + s.x * s.y * s.z; + return dest; + }; + vec3.zero = new vec3([0, 0, 0]); + vec3.up = new vec3([0, 1, 0]); + vec3.right = new vec3([1, 0, 0]); + vec3.forward = new vec3([0, 0, 1]); + return vec3; + })(); + TSM.vec3 = vec3; +})(TSM || (TSM = {})); diff --git a/lib/tsm/vec3.ts b/lib/tsm/vec3.ts index 83af1f2..d1d437a 100644 --- a/lib/tsm/vec3.ts +++ b/lib/tsm/vec3.ts @@ -33,448 +33,446 @@ /// -module TSM +import {mat3} from './mat3'; +import {quat} from './quat'; + +export class vec3 { + static zero = new vec3([0, 0, 0]); - export class vec3 + static up = new vec3([0, 1, 0]); + static right = new vec3([1, 0, 0]); + static forward = new vec3([0, 0, 1]); + + private values = new Float32Array(3); + + static cross(vector: vec3, vector2: vec3, dest: vec3 | null = null): vec3 { - static zero = new vec3([0, 0, 0]); - - static up = new vec3([0, 1, 0]); - static right = new vec3([1, 0, 0]); - static forward = new vec3([0, 0, 1]); - - private values = new Float32Array(3); - - static cross(vector: vec3, vector2: vec3, dest: vec3 | null = null): vec3 + if (!dest) { - if (!dest) - { - dest = new vec3(); - } + dest = new vec3(); + } - const x = vector.x, - y = vector.y, - z = vector.z; + const x = vector.x, + y = vector.y, + z = vector.z; - const x2 = vector2.x, - y2 = vector2.y, - z2 = vector2.z; + const x2 = vector2.x, + y2 = vector2.y, + z2 = vector2.z; - dest.x = y * z2 - z * y2; - dest.y = z * x2 - x * z2; - dest.z = x * y2 - y * x2; + dest.x = y * z2 - z * y2; + dest.y = z * x2 - x * z2; + dest.z = x * y2 - y * x2; + + return dest; + } + + static dot(vector: vec3, vector2: vec3): number + { + const x = vector.x, + y = vector.y, + z = vector.z; + + const x2 = vector2.x, + y2 = vector2.y, + z2 = vector2.z; + + return (x * x2 + y * y2 + z * z2); + } + + static distance(vector: vec3, vector2: vec3): number + { + const x = vector2.x - vector.x, + y = vector2.y - vector.y, + z = vector2.z - vector.z; + + return Math.sqrt(this.squaredDistance(vector, vector2)); + } + + static squaredDistance(vector: vec3, vector2: vec3): number + { + const x = vector2.x - vector.x, + y = vector2.y - vector.y, + z = vector2.z - vector.z; + + return (x * x + y * y + z * z); + } + + static direction(vector: vec3, vector2: vec3, dest: vec3 | null = null): vec3 + { + if (!dest) + { + dest = new vec3(); + } + + const x = vector.x - vector2.x, + y = vector.y - vector2.y, + z = vector.z - vector2.z; + + let length = Math.sqrt(x * x + y * y + z * z); + + if (length === 0) + { + dest.x = 0; + dest.y = 0; + dest.z = 0; return dest; } - static dot(vector: vec3, vector2: vec3): number + length = 1 / length; + + dest.x = x * length; + dest.y = y * length; + dest.z = z * length; + + return dest; + } + + static mix(vector: vec3, vector2: vec3, time: number, dest: vec3 | null = null): vec3 + { + if (!dest) { - const x = vector.x, - y = vector.y, - z = vector.z; - - const x2 = vector2.x, - y2 = vector2.y, - z2 = vector2.z; - - return (x * x2 + y * y2 + z * z2); + dest = new vec3(); } - static distance(vector: vec3, vector2: vec3): number - { - const x = vector2.x - vector.x, - y = vector2.y - vector.y, - z = vector2.z - vector.z; + dest.x = vector.x + time * (vector2.x - vector.x); + dest.y = vector.y + time * (vector2.y - vector.y); + dest.z = vector.z + time * (vector2.z - vector.z); - return Math.sqrt(this.squaredDistance(vector, vector2)); + return dest; + } + + static sum(vector: vec3, vector2: vec3, dest: vec3 | null = null): vec3 + { + if (!dest) + { + dest = new vec3(); } - static squaredDistance(vector: vec3, vector2: vec3): number - { - const x = vector2.x - vector.x, - y = vector2.y - vector.y, - z = vector2.z - vector.z; + dest.x = vector.x + vector2.x; + dest.y = vector.y + vector2.y; + dest.z = vector.z + vector2.z; - return (x * x + y * y + z * z); + return dest; + } + + static difference(vector: vec3, vector2: vec3, dest: vec3 | null = null): vec3 + { + if (!dest) + { + dest = new vec3(); } - static direction(vector: vec3, vector2: vec3, dest: vec3 | null = null): vec3 + dest.x = vector.x - vector2.x; + dest.y = vector.y - vector2.y; + dest.z = vector.z - vector2.z; + + return dest; + } + + static product(vector: vec3, vector2: vec3, dest: vec3 | null = null): vec3 + { + if (!dest) { - if (!dest) - { - dest = new vec3(); - } - - const x = vector.x - vector2.x, - y = vector.y - vector2.y, - z = vector.z - vector2.z; - - let length = Math.sqrt(x * x + y * y + z * z); - - if (length === 0) - { - dest.x = 0; - dest.y = 0; - dest.z = 0; - - return dest; - } - - length = 1 / length; - - dest.x = x * length; - dest.y = y * length; - dest.z = z * length; - - return dest; + dest = new vec3(); } - static mix(vector: vec3, vector2: vec3, time: number, dest: vec3 | null = null): vec3 + dest.x = vector.x * vector2.x; + dest.y = vector.y * vector2.y; + dest.z = vector.z * vector2.z; + + return dest; + } + + static quotient(vector: vec3, vector2: vec3, dest: vec3 | null = null): vec3 + { + if (!dest) { - if (!dest) - { - dest = new vec3(); - } - - dest.x = vector.x + time * (vector2.x - vector.x); - dest.y = vector.y + time * (vector2.y - vector.y); - dest.z = vector.z + time * (vector2.z - vector.z); - - return dest; + dest = new vec3(); } - static sum(vector: vec3, vector2: vec3, dest: vec3 | null = null): vec3 + dest.x = vector.x / vector2.x; + dest.y = vector.y / vector2.y; + dest.z = vector.z / vector2.z; + + return dest; + } + + + + get x(): number + { + return this.values[0]; + } + + get y(): number + { + return this.values[1]; + } + + get z(): number + { + return this.values[2]; + } + + get xy(): number[] + { + return [ + this.values[0], + this.values[1] + ]; + } + + get xyz(): number[] + { + return [ + this.values[0], + this.values[1], + this.values[2] + ]; + } + + set x(value: number) + { + this.values[0] = value; + } + + set y(value: number) + { + this.values[1] = value; + } + + set z(value: number) + { + this.values[2] = value; + } + + set xy(values: number[]) + { + this.values[0] = values[0]; + this.values[1] = values[1]; + } + + set xyz(values: number[]) + { + this.values[0] = values[0]; + this.values[1] = values[1]; + this.values[2] = values[2]; + } + + constructor(values: number[] | null = null) + { + if (values) { - if (!dest) - { - dest = new vec3(); - } - - dest.x = vector.x + vector2.x; - dest.y = vector.y + vector2.y; - dest.z = vector.z + vector2.z; - - return dest; - } - - static difference(vector: vec3, vector2: vec3, dest: vec3 | null = null): vec3 - { - if (!dest) - { - dest = new vec3(); - } - - dest.x = vector.x - vector2.x; - dest.y = vector.y - vector2.y; - dest.z = vector.z - vector2.z; - - return dest; - } - - static product(vector: vec3, vector2: vec3, dest: vec3 | null = null): vec3 - { - if (!dest) - { - dest = new vec3(); - } - - dest.x = vector.x * vector2.x; - dest.y = vector.y * vector2.y; - dest.z = vector.z * vector2.z; - - return dest; - } - - static quotient(vector: vec3, vector2: vec3, dest: vec3 | null = null): vec3 - { - if (!dest) - { - dest = new vec3(); - } - - dest.x = vector.x / vector2.x; - dest.y = vector.y / vector2.y; - dest.z = vector.z / vector2.z; - - return dest; - } - - - - get x(): number - { - return this.values[0]; - } - - get y(): number - { - return this.values[1]; - } - - get z(): number - { - return this.values[2]; - } - - get xy(): number[] - { - return [ - this.values[0], - this.values[1] - ]; - } - - get xyz(): number[] - { - return [ - this.values[0], - this.values[1], - this.values[2] - ]; - } - - set x(value: number) - { - this.values[0] = value; - } - - set y(value: number) - { - this.values[1] = value; - } - - set z(value: number) - { - this.values[2] = value; - } - - set xy(values: number[]) - { - this.values[0] = values[0]; - this.values[1] = values[1]; - } - - set xyz(values: number[]) - { - this.values[0] = values[0]; - this.values[1] = values[1]; - this.values[2] = values[2]; - } - - constructor(values: number[] | null = null) - { - if (values) - { - this.xyz = values; - } - } - - at(index: number): number - { - return this.values[index]; - } - - reset(): void - { - this.x = 0; - this.y = 0; - this.z = 0; - } - - copy(dest: vec3 | null = null): vec3 - { - if (!dest) - { - dest = new vec3(); - } - - dest.x = this.x; - dest.y = this.y; - dest.z = this.z; - - return dest; - } - - negate(dest: vec3 | null = null): vec3 - { - if (!dest) - { - dest = this; - } - - dest.x = -this.x; - dest.y = -this.y; - dest.z = -this.z; - - return dest; - } - - equals(vector: vec3, threshold = EPSILON): boolean - { - if (Math.abs(this.x - vector.x) > threshold) - { - return false; - } - - if (Math.abs(this.y - vector.y) > threshold) - { - return false; - } - - if (Math.abs(this.z - vector.z) > threshold) - { - return false; - } - - - return true; - } - - length(): number - { - return Math.sqrt(this.squaredLength()); - } - - squaredLength(): number - { - const x = this.x, - y = this.y, - z = this.z; - - return (x * x + y * y + z * z); - } - - add(vector: vec3): vec3 - { - this.x += vector.x; - this.y += vector.y; - this.z += vector.z; - - return this; - } - - subtract(vector: vec3): vec3 - { - this.x -= vector.x; - this.y -= vector.y; - this.z -= vector.z; - - return this; - } - - multiply(vector: vec3): vec3 - { - this.x *= vector.x; - this.y *= vector.y; - this.z *= vector.z; - - return this; - } - - divide(vector: vec3): vec3 - { - this.x /= vector.x; - this.y /= vector.y; - this.z /= vector.z; - - return this; - } - - scale(value: number, dest: vec3 | null = null): vec3 - { - if (!dest) - { - dest = this; - } - - dest.x *= value; - dest.y *= value; - dest.z *= value; - - return dest; - } - - normalize(dest: vec3 | null = null): vec3 - { - if (!dest) - { - dest = this; - } - - let length = this.length(); - - if (length === 1) - { - return this; - } - - if (length === 0) - { - dest.x = 0; - dest.y = 0; - dest.z = 0; - - return dest; - } - - length = 1.0 / length; - - dest.x *= length; - dest.y *= length; - dest.z *= length; - - return dest; - } - - multiplyByMat3(matrix: mat3, dest: vec3 | null = null): vec3 - { - if (!dest) - { - dest = this; - } - - return matrix.multiplyVec3(this, dest); - } - - multiplyByQuat(quat: quat, dest: vec3 | null = null): vec3 - { - if (!dest) - { - dest = this; - } - - return quat.multiplyVec3(this, dest); - } - - toQuat(dest: quat | null = null): quat - { - if (!dest) - { - dest = new quat(); - } - - const c = new vec3(); - const s = new vec3(); - - c.x = Math.cos(this.x * 0.5); - s.x = Math.sin(this.x * 0.5); - - c.y = Math.cos(this.y * 0.5); - s.y = Math.sin(this.y * 0.5); - - c.z = Math.cos(this.z * 0.5); - s.z = Math.sin(this.z * 0.5); - - dest.x = s.x * c.y * c.z - c.x * s.y * s.z; - dest.y = c.x * s.y * c.z + s.x * c.y * s.z; - dest.z = c.x * c.y * s.z - s.x * s.y * c.z; - dest.w = c.x * c.y * c.z + s.x * s.y * s.z; - - return dest; + this.xyz = values; } } + at(index: number): number + { + return this.values[index]; + } + + reset(): void + { + this.x = 0; + this.y = 0; + this.z = 0; + } + + copy(dest: vec3 | null = null): vec3 + { + if (!dest) + { + dest = new vec3(); + } + + dest.x = this.x; + dest.y = this.y; + dest.z = this.z; + + return dest; + } + + negate(dest: vec3 | null = null): vec3 + { + if (!dest) + { + dest = this; + } + + dest.x = -this.x; + dest.y = -this.y; + dest.z = -this.z; + + return dest; + } + + equals(vector: vec3, threshold = EPSILON): boolean + { + if (Math.abs(this.x - vector.x) > threshold) + { + return false; + } + + if (Math.abs(this.y - vector.y) > threshold) + { + return false; + } + + if (Math.abs(this.z - vector.z) > threshold) + { + return false; + } + + + return true; + } + + length(): number + { + return Math.sqrt(this.squaredLength()); + } + + squaredLength(): number + { + const x = this.x, + y = this.y, + z = this.z; + + return (x * x + y * y + z * z); + } + + add(vector: vec3): vec3 + { + this.x += vector.x; + this.y += vector.y; + this.z += vector.z; + + return this; + } + + subtract(vector: vec3): vec3 + { + this.x -= vector.x; + this.y -= vector.y; + this.z -= vector.z; + + return this; + } + + multiply(vector: vec3): vec3 + { + this.x *= vector.x; + this.y *= vector.y; + this.z *= vector.z; + + return this; + } + + divide(vector: vec3): vec3 + { + this.x /= vector.x; + this.y /= vector.y; + this.z /= vector.z; + + return this; + } + + scale(value: number, dest: vec3 | null = null): vec3 + { + if (!dest) + { + dest = this; + } + + dest.x *= value; + dest.y *= value; + dest.z *= value; + + return dest; + } + + normalize(dest: vec3 | null = null): vec3 + { + if (!dest) + { + dest = this; + } + + let length = this.length(); + + if (length === 1) + { + return this; + } + + if (length === 0) + { + dest.x = 0; + dest.y = 0; + dest.z = 0; + + return dest; + } + + length = 1.0 / length; + + dest.x *= length; + dest.y *= length; + dest.z *= length; + + return dest; + } + + multiplyByMat3(matrix: mat3, dest: vec3 | null = null): vec3 + { + if (!dest) + { + dest = this; + } + + return matrix.multiplyVec3(this, dest); + } + + multiplyByQuat(quat: quat, dest: vec3 | null = null): vec3 + { + if (!dest) + { + dest = this; + } + + return quat.multiplyVec3(this, dest); + } + + toQuat(dest: quat | null = null): quat + { + if (!dest) + { + dest = new quat(); + } + + const c = new vec3(); + const s = new vec3(); + + c.x = Math.cos(this.x * 0.5); + s.x = Math.sin(this.x * 0.5); + + c.y = Math.cos(this.y * 0.5); + s.y = Math.sin(this.y * 0.5); + + c.z = Math.cos(this.z * 0.5); + s.z = Math.sin(this.z * 0.5); + + dest.x = s.x * c.y * c.z - c.x * s.y * s.z; + dest.y = c.x * s.y * c.z + s.x * c.y * s.z; + dest.z = c.x * c.y * s.z - s.x * s.y * c.z; + dest.w = c.x * c.y * c.z + s.x * s.y * s.z; + + return dest; + } } diff --git a/lib/tsm/vec4.js b/lib/tsm/vec4.js new file mode 100644 index 0000000..a8a5bd1 --- /dev/null +++ b/lib/tsm/vec4.js @@ -0,0 +1,399 @@ +/** + * @fileoverview TSM - A TypeScript vector and matrix math library + * @author Matthias Ferch + * @version 0.6 + */ +/* + * Copyright (c) 2012 Matthias Ferch + * + * Project homepage: https://github.com/matthiasferch/tsm + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * + * 2. Altered source versions must be plainly marked as such, and must not + * be misrepresented as being the original software. + * + * 3. This notice may not be removed or altered from any source + * distribution. + */ +/// +var TSM; +(function (TSM) { + var vec4 = (function () { + function vec4(values) { + if (values === void 0) { values = null = null; } + this.values = new Float32Array(4); + if (values) { + this.xyzw = values; + } + } + vec4.mix = function (vector, vector2, time, dest) { + if (dest === void 0) { dest = null = null; } + if (!dest) { + dest = new vec4(); + } + dest.x = vector.x + time * (vector2.x - vector.x); + dest.y = vector.y + time * (vector2.y - vector.y); + dest.z = vector.z + time * (vector2.z - vector.z); + dest.w = vector.w + time * (vector2.w - vector.w); + return dest; + }; + vec4.sum = function (vector, vector2, dest) { + if (dest === void 0) { dest = null = null; } + if (!dest) { + dest = new vec4(); + } + dest.x = vector.x + vector2.x, + dest.y = vector.y + vector2.y, + dest.z = vector.z + vector2.z, + dest.w = vector.w + vector2.w; + return dest; + }; + vec4.difference = function (vector, vector2, dest) { + if (dest === void 0) { dest = null = null; } + if (!dest) { + dest = new vec4(); + } + dest.x = vector.x - vector2.x, + dest.y = vector.y - vector2.y, + dest.z = vector.z - vector2.z, + dest.w = vector.w - vector2.w; + return dest; + }; + vec4.product = function (vector, vector2, dest) { + if (dest === void 0) { dest = null = null; } + if (!dest) { + dest = new vec4(); + } + dest.x = vector.x * vector2.x, + dest.y = vector.y * vector2.y, + dest.z = vector.z * vector2.z, + dest.w = vector.w * vector2.w; + return dest; + }; + vec4.quotient = function (vector, vector2, dest) { + if (dest === void 0) { dest = null = null; } + if (!dest) { + dest = new vec4(); + } + dest.x = vector.x / vector2.x, + dest.y = vector.y / vector2.y, + dest.z = vector.z / vector2.z, + dest.w = vector.w / vector2.w; + return dest; + }; + Object.defineProperty(vec4.prototype, "x", { + get: function () { + return this.values[0]; + }, + set: function (value) { + this.values[0] = value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(vec4.prototype, "y", { + get: function () { + return this.values[1]; + }, + set: function (value) { + this.values[1] = value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(vec4.prototype, "z", { + get: function () { + return this.values[2]; + }, + set: function (value) { + this.values[2] = value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(vec4.prototype, "w", { + get: function () { + return this.values[3]; + }, + set: function (value) { + this.values[3] = value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(vec4.prototype, "xy", { + get: function () { + return [ + this.values[0], + this.values[1] + ]; + }, + set: function (values) { + this.values[0] = values[0]; + this.values[1] = values[1]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(vec4.prototype, "xyz", { + get: function () { + return [ + this.values[0], + this.values[1], + this.values[2] + ]; + }, + set: function (values) { + this.values[0] = values[0]; + this.values[1] = values[1]; + this.values[2] = values[2]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(vec4.prototype, "xyzw", { + get: function () { + return [ + this.values[0], + this.values[1], + this.values[2], + this.values[3] + ]; + }, + set: function (values) { + this.values[0] = values[0]; + this.values[1] = values[1]; + this.values[2] = values[2]; + this.values[3] = values[3]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(vec4.prototype, "r", { + get: function () { + return this.values[0]; + }, + set: function (value) { + this.values[0] = value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(vec4.prototype, "g", { + get: function () { + return this.values[1]; + }, + set: function (value) { + this.values[1] = value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(vec4.prototype, "b", { + get: function () { + return this.values[2]; + }, + set: function (value) { + this.values[2] = value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(vec4.prototype, "a", { + get: function () { + return this.values[3]; + }, + set: function (value) { + this.values[3] = value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(vec4.prototype, "rg", { + get: function () { + return [ + this.values[0], + this.values[1] + ]; + }, + set: function (values) { + this.values[0] = values[0]; + this.values[1] = values[1]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(vec4.prototype, "rgb", { + get: function () { + return [ + this.values[0], + this.values[1], + this.values[2] + ]; + }, + set: function (values) { + this.values[0] = values[0]; + this.values[1] = values[1]; + this.values[2] = values[2]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(vec4.prototype, "rgba", { + get: function () { + return [ + this.values[0], + this.values[1], + this.values[2], + this.values[3] + ]; + }, + set: function (values) { + this.values[0] = values[0]; + this.values[1] = values[1]; + this.values[2] = values[2]; + this.values[3] = values[3]; + }, + enumerable: true, + configurable: true + }); + vec4.prototype.at = function (index) { + return this.values[index]; + }; + vec4.prototype.reset = function () { + this.x = 0; + this.y = 0; + this.z = 0; + this.w = 0; + }; + vec4.prototype.copy = function (dest) { + if (dest === void 0) { dest = null = null; } + if (!dest) { + dest = new vec4(); + } + dest.x = this.x; + dest.y = this.y; + dest.z = this.z; + dest.w = this.w; + return dest; + }; + vec4.prototype.negate = function (dest) { + if (dest === void 0) { dest = null = null; } + if (!dest) { + dest = this; + } + dest.x = -this.x; + dest.y = -this.y; + dest.z = -this.z; + dest.w = -this.w; + return dest; + }; + vec4.prototype.equals = function (vector, threshold) { + if (threshold === void 0) { threshold = EPSILON; } + if (Math.abs(this.x - vector.x) > threshold) { + return false; + } + if (Math.abs(this.y - vector.y) > threshold) { + return false; + } + if (Math.abs(this.z - vector.z) > threshold) { + return false; + } + if (Math.abs(this.w - vector.w) > threshold) { + return false; + } + return true; + }; + vec4.prototype.length = function () { + return Math.sqrt(this.squaredLength()); + }; + vec4.prototype.squaredLength = function () { + var x = this.x, y = this.y, z = this.z, w = this.w; + return (x * x + y * y + z * z + w * w); + }; + vec4.prototype.add = function (vector) { + this.x += vector.x; + this.y += vector.y; + this.z += vector.z; + this.w += vector.w; + return this; + }; + vec4.prototype.subtract = function (vector) { + this.x -= vector.x; + this.y -= vector.y; + this.z -= vector.z; + this.w -= vector.w; + return this; + }; + vec4.prototype.multiply = function (vector) { + this.x *= vector.x; + this.y *= vector.y; + this.z *= vector.z; + this.w *= vector.w; + return this; + }; + vec4.prototype.divide = function (vector) { + this.x /= vector.x; + this.y /= vector.y; + this.z /= vector.z; + this.w /= vector.w; + return this; + }; + vec4.prototype.scale = function (value, dest) { + if (dest === void 0) { dest = null = null; } + if (!dest) { + dest = this; + } + dest.x *= value; + dest.y *= value; + dest.z *= value; + dest.w *= value; + return dest; + }; + vec4.prototype.normalize = function (dest) { + if (dest === void 0) { dest = null = null; } + if (!dest) { + dest = this; + } + var length = this.length(); + if (length === 1) { + return this; + } + if (length === 0) { + dest.x *= 0; + dest.y *= 0; + dest.z *= 0; + dest.w *= 0; + return dest; + } + length = 1.0 / length; + dest.x *= length; + dest.y *= length; + dest.z *= length; + dest.w *= length; + return dest; + }; + vec4.prototype.multiplyMat4 = function (matrix, dest) { + if (dest === void 0) { dest = null = null; } + if (!dest) { + dest = this; + } + return matrix.multiplyVec4(this, dest); + }; + vec4.zero = new vec4([0, 0, 0, 1]); + return vec4; + })(); + TSM.vec4 = vec4; +})(TSM || (TSM = {})); diff --git a/lib/tsm/vec4.ts b/lib/tsm/vec4.ts index d648821..cc4308d 100644 --- a/lib/tsm/vec4.ts +++ b/lib/tsm/vec4.ts @@ -32,458 +32,454 @@ /// +import {mat4} from './mat4'; -module TSM +export class vec4 { + static zero = new vec4([0, 0, 0, 1]); - export class vec4 + private values = new Float32Array(4); + + static mix(vector: vec4, vector2: vec4, time: number, dest: vec4 | null = null): vec4 { - static zero = new vec4([0, 0, 0, 1]); - - private values = new Float32Array(4); - - static mix(vector: vec4, vector2: vec4, time: number, dest: vec4 | null = null): vec4 + if (!dest) { - if (!dest) - { - dest = new vec4(); - } - - dest.x = vector.x + time * (vector2.x - vector.x); - dest.y = vector.y + time * (vector2.y - vector.y); - dest.z = vector.z + time * (vector2.z - vector.z); - dest.w = vector.w + time * (vector2.w - vector.w); - - return dest; + dest = new vec4(); } - static sum(vector: vec4, vector2: vec4, dest: vec4 | null = null): vec4 + dest.x = vector.x + time * (vector2.x - vector.x); + dest.y = vector.y + time * (vector2.y - vector.y); + dest.z = vector.z + time * (vector2.z - vector.z); + dest.w = vector.w + time * (vector2.w - vector.w); + + return dest; + } + + static sum(vector: vec4, vector2: vec4, dest: vec4 | null = null): vec4 + { + if (!dest) { - if (!dest) - { - dest = new vec4(); - } - - dest.x = vector.x + vector2.x, - dest.y = vector.y + vector2.y, - dest.z = vector.z + vector2.z, - dest.w = vector.w + vector2.w - - return dest; + dest = new vec4(); } - static difference(vector: vec4, vector2: vec4, dest: vec4 | null = null): vec4 + dest.x = vector.x + vector2.x, + dest.y = vector.y + vector2.y, + dest.z = vector.z + vector2.z, + dest.w = vector.w + vector2.w + + return dest; + } + + static difference(vector: vec4, vector2: vec4, dest: vec4 | null = null): vec4 + { + if (!dest) { - if (!dest) - { - dest = new vec4(); - } - - dest.x = vector.x - vector2.x, - dest.y = vector.y - vector2.y, - dest.z = vector.z - vector2.z, - dest.w = vector.w - vector2.w - - return dest; + dest = new vec4(); } - static product(vector: vec4, vector2: vec4, dest: vec4 | null = null): vec4 + dest.x = vector.x - vector2.x, + dest.y = vector.y - vector2.y, + dest.z = vector.z - vector2.z, + dest.w = vector.w - vector2.w + + return dest; + } + + static product(vector: vec4, vector2: vec4, dest: vec4 | null = null): vec4 + { + if (!dest) { - if (!dest) - { - dest = new vec4(); - } - - dest.x = vector.x * vector2.x, - dest.y = vector.y * vector2.y, - dest.z = vector.z * vector2.z, - dest.w = vector.w * vector2.w - - return dest; + dest = new vec4(); } - static quotient(vector: vec4, vector2: vec4, dest: vec4 | null = null): vec4 + dest.x = vector.x * vector2.x, + dest.y = vector.y * vector2.y, + dest.z = vector.z * vector2.z, + dest.w = vector.w * vector2.w + + return dest; + } + + static quotient(vector: vec4, vector2: vec4, dest: vec4 | null = null): vec4 + { + if (!dest) { - if (!dest) - { - dest = new vec4(); - } - - dest.x = vector.x / vector2.x, - dest.y = vector.y / vector2.y, - dest.z = vector.z / vector2.z, - dest.w = vector.w / vector2.w - - return dest; + dest = new vec4(); } - get x(): number + dest.x = vector.x / vector2.x, + dest.y = vector.y / vector2.y, + dest.z = vector.z / vector2.z, + dest.w = vector.w / vector2.w + + return dest; + } + + get x(): number + { + return this.values[0]; + } + + get y(): number + { + return this.values[1]; + } + + get z(): number + { + return this.values[2]; + } + + get w(): number + { + return this.values[3]; + } + + get xy(): number[] + { + return [ + this.values[0], + this.values[1] + ]; + } + + get xyz(): number[] + { + return [ + this.values[0], + this.values[1], + this.values[2] + ]; + } + + get xyzw(): number[] + { + return [ + this.values[0], + this.values[1], + this.values[2], + this.values[3] + ]; + } + + set x(value: number) + { + this.values[0] = value; + } + + set y(value: number) + { + this.values[1] = value; + } + + set z(value: number) + { + this.values[2] = value; + } + + set w(value: number) + { + this.values[3] = value; + } + + set xy(values: number[]) + { + this.values[0] = values[0]; + this.values[1] = values[1]; + } + + set xyz(values: number[]) + { + this.values[0] = values[0]; + this.values[1] = values[1]; + this.values[2] = values[2]; + } + + set xyzw(values: number[]) + { + this.values[0] = values[0]; + this.values[1] = values[1]; + this.values[2] = values[2]; + this.values[3] = values[3]; + } + + get r(): number + { + return this.values[0]; + } + + get g(): number + { + return this.values[1]; + } + + get b(): number + { + return this.values[2]; + } + + get a(): number + { + return this.values[3]; + } + + get rg(): number[] + { + return [ + this.values[0], + this.values[1] + ]; + } + + get rgb(): number[] + { + return [ + this.values[0], + this.values[1], + this.values[2] + ]; + } + + get rgba(): number[] + { + return [ + this.values[0], + this.values[1], + this.values[2], + this.values[3] + ]; + } + + set r(value: number) + { + this.values[0] = value; + } + + set g(value: number) + { + this.values[1] = value; + } + + set b(value: number) + { + this.values[2] = value; + } + + set a(value: number) + { + this.values[3] = value; + } + + set rg(values: number[]) + { + this.values[0] = values[0]; + this.values[1] = values[1]; + } + + set rgb(values: number[]) + { + this.values[0] = values[0]; + this.values[1] = values[1]; + this.values[2] = values[2]; + } + + set rgba(values: number[]) + { + this.values[0] = values[0]; + this.values[1] = values[1]; + this.values[2] = values[2]; + this.values[3] = values[3]; + } + + constructor(values: number[] | null = null) + { + if (values) { - return this.values[0]; - } - - get y(): number - { - return this.values[1]; - } - - get z(): number - { - return this.values[2]; - } - - get w(): number - { - return this.values[3]; - } - - get xy(): number[] - { - return [ - this.values[0], - this.values[1] - ]; - } - - get xyz(): number[] - { - return [ - this.values[0], - this.values[1], - this.values[2] - ]; - } - - get xyzw(): number[] - { - return [ - this.values[0], - this.values[1], - this.values[2], - this.values[3] - ]; - } - - set x(value: number) - { - this.values[0] = value; - } - - set y(value: number) - { - this.values[1] = value; - } - - set z(value: number) - { - this.values[2] = value; - } - - set w(value: number) - { - this.values[3] = value; - } - - set xy(values: number[]) - { - this.values[0] = values[0]; - this.values[1] = values[1]; - } - - set xyz(values: number[]) - { - this.values[0] = values[0]; - this.values[1] = values[1]; - this.values[2] = values[2]; - } - - set xyzw(values: number[]) - { - this.values[0] = values[0]; - this.values[1] = values[1]; - this.values[2] = values[2]; - this.values[3] = values[3]; - } - - get r(): number - { - return this.values[0]; - } - - get g(): number - { - return this.values[1]; - } - - get b(): number - { - return this.values[2]; - } - - get a(): number - { - return this.values[3]; - } - - get rg(): number[] - { - return [ - this.values[0], - this.values[1] - ]; - } - - get rgb(): number[] - { - return [ - this.values[0], - this.values[1], - this.values[2] - ]; - } - - get rgba(): number[] - { - return [ - this.values[0], - this.values[1], - this.values[2], - this.values[3] - ]; - } - - set r(value: number) - { - this.values[0] = value; - } - - set g(value: number) - { - this.values[1] = value; - } - - set b(value: number) - { - this.values[2] = value; - } - - set a(value: number) - { - this.values[3] = value; - } - - set rg(values: number[]) - { - this.values[0] = values[0]; - this.values[1] = values[1]; - } - - set rgb(values: number[]) - { - this.values[0] = values[0]; - this.values[1] = values[1]; - this.values[2] = values[2]; - } - - set rgba(values: number[]) - { - this.values[0] = values[0]; - this.values[1] = values[1]; - this.values[2] = values[2]; - this.values[3] = values[3]; - } - - constructor(values: number[] | null = null) - { - if (values) - { - this.xyzw = values; - } - } - - at(index: number): number - { - return this.values[index]; - } - - reset(): void - { - this.x = 0; - this.y = 0; - this.z = 0; - this.w = 0; - } - - copy(dest: vec4 | null = null): vec4 - { - if (!dest) - { - dest = new vec4(); - } - - dest.x = this.x; - dest.y = this.y; - dest.z = this.z; - dest.w = this.w; - - return dest; - } - - negate(dest: vec4 | null = null): vec4 - { - if (!dest) - { - dest = this; - } - - dest.x = -this.x; - dest.y = -this.y; - dest.z = -this.z; - dest.w = -this.w; - - return dest; - } - - equals(vector: vec4, threshold = EPSILON): boolean - { - if (Math.abs(this.x - vector.x) > threshold) - { - return false; - } - - if (Math.abs(this.y - vector.y) > threshold) - { - return false; - } - - if (Math.abs(this.z - vector.z) > threshold) - { - return false; - } - - if (Math.abs(this.w - vector.w) > threshold) - { - return false; - } - - return true; - } - - length(): number - { - return Math.sqrt(this.squaredLength()); - } - - squaredLength(): number - { - const x = this.x, - y = this.y, - z = this.z, - w = this.w; - - return (x * x + y * y + z * z + w * w); - } - - add(vector: vec4): vec4 - { - this.x += vector.x; - this.y += vector.y; - this.z += vector.z; - this.w += vector.w; - - return this; - } - - subtract(vector: vec4): vec4 - { - this.x -= vector.x; - this.y -= vector.y; - this.z -= vector.z; - this.w -= vector.w; - - return this; - } - - multiply(vector: vec4): vec4 - { - this.x *= vector.x; - this.y *= vector.y; - this.z *= vector.z; - this.w *= vector.w; - - return this; - } - - divide(vector: vec4): vec4 - { - this.x /= vector.x; - this.y /= vector.y; - this.z /= vector.z; - this.w /= vector.w; - - return this; - } - - scale(value: number, dest: vec4 | null = null): vec4 - { - if (!dest) - { - dest = this; - } - - dest.x *= value; - dest.y *= value; - dest.z *= value; - dest.w *= value; - - return dest; - } - - normalize(dest: vec4 | null = null): vec4 - { - if (!dest) - { - dest = this; - } - - let length = this.length(); - - if (length === 1) - { - return this; - } - - if (length === 0) - { - dest.x *= 0; - dest.y *= 0; - dest.z *= 0; - dest.w *= 0; - - return dest; - } - - length = 1.0 / length; - - dest.x *= length; - dest.y *= length; - dest.z *= length; - dest.w *= length; - - return dest; - } - - multiplyMat4(matrix: mat4, dest: vec4 | null = null): vec4 - { - if (!dest) - { - dest = this; - } - - return matrix.multiplyVec4(this, dest); + this.xyzw = values; } } + at(index: number): number + { + return this.values[index]; + } + + reset(): void + { + this.x = 0; + this.y = 0; + this.z = 0; + this.w = 0; + } + + copy(dest: vec4 | null = null): vec4 + { + if (!dest) + { + dest = new vec4(); + } + + dest.x = this.x; + dest.y = this.y; + dest.z = this.z; + dest.w = this.w; + + return dest; + } + + negate(dest: vec4 | null = null): vec4 + { + if (!dest) + { + dest = this; + } + + dest.x = -this.x; + dest.y = -this.y; + dest.z = -this.z; + dest.w = -this.w; + + return dest; + } + + equals(vector: vec4, threshold = EPSILON): boolean + { + if (Math.abs(this.x - vector.x) > threshold) + { + return false; + } + + if (Math.abs(this.y - vector.y) > threshold) + { + return false; + } + + if (Math.abs(this.z - vector.z) > threshold) + { + return false; + } + + if (Math.abs(this.w - vector.w) > threshold) + { + return false; + } + + return true; + } + + length(): number + { + return Math.sqrt(this.squaredLength()); + } + + squaredLength(): number + { + const x = this.x, + y = this.y, + z = this.z, + w = this.w; + + return (x * x + y * y + z * z + w * w); + } + + add(vector: vec4): vec4 + { + this.x += vector.x; + this.y += vector.y; + this.z += vector.z; + this.w += vector.w; + + return this; + } + + subtract(vector: vec4): vec4 + { + this.x -= vector.x; + this.y -= vector.y; + this.z -= vector.z; + this.w -= vector.w; + + return this; + } + + multiply(vector: vec4): vec4 + { + this.x *= vector.x; + this.y *= vector.y; + this.z *= vector.z; + this.w *= vector.w; + + return this; + } + + divide(vector: vec4): vec4 + { + this.x /= vector.x; + this.y /= vector.y; + this.z /= vector.z; + this.w /= vector.w; + + return this; + } + + scale(value: number, dest: vec4 | null = null): vec4 + { + if (!dest) + { + dest = this; + } + + dest.x *= value; + dest.y *= value; + dest.z *= value; + dest.w *= value; + + return dest; + } + + normalize(dest: vec4 | null = null): vec4 + { + if (!dest) + { + dest = this; + } + + let length = this.length(); + + if (length === 1) + { + return this; + } + + if (length === 0) + { + dest.x *= 0; + dest.y *= 0; + dest.z *= 0; + dest.w *= 0; + + return dest; + } + + length = 1.0 / length; + + dest.x *= length; + dest.y *= length; + dest.z *= length; + dest.w *= length; + + return dest; + } + + multiplyMat4(matrix: mat4, dest: vec4 | null = null): vec4 + { + if (!dest) + { + dest = this; + } + + return matrix.multiplyVec4(this, dest); + } } diff --git a/package.json b/package.json index 808732d..8a33c11 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "types": "dist/index.d.ts", "scripts": { "prepublish": "npm run build", - "build": "tsc", + "build": "tsc --removeComments", "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", @@ -21,10 +21,12 @@ "typescript": "^2.6.1" }, "dependencies": { + "@types/long": "^3.0.32", "@types/uuid": "^3.4.3", "@types/validator": "^6.3.0", "@types/xml": "^1.0.2", "@types/xmlrpc": "^1.3.3", + "long": "^3.2.0", "uuid": "^3.1.0", "validator": "^9.1.1", "xml": "^1.0.1", diff --git a/tools/msg_template.json b/tools/msg_template.json new file mode 100644 index 0000000..fb1f758 --- /dev/null +++ b/tools/msg_template.json @@ -0,0 +1 @@ +[{"name":"TestMessage","frequency":"Low","id":"1","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"TestBlock1","type":"Single","count":1,"params":[{"name":"Test1","type":"U32","size":1}]},{"name":"NeighborBlock","type":"Multiple","count":"4","params":[{"name":"Test0","type":"U32","size":1},{"name":"Test1","type":"U32","size":1},{"name":"Test2","type":"U32","size":1}]}]},{"name":"PacketAck","frequency":"Fixed","id":"0xFFFFFFFB","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"Packets","type":"Variable","count":1,"params":[{"name":"ID","type":"U32","size":1}]}]},{"name":"OpenCircuit","frequency":"Fixed","id":"0xFFFFFFFC","flags":["NotTrusted","Unencoded","UDPBlackListed"],"blocks":[{"name":"CircuitInfo","type":"Single","count":1,"params":[{"name":"IP","type":"IPADDR","size":1},{"name":"Port","type":"IPPORT","size":1}]}]},{"name":"CloseCircuit","frequency":"Fixed","id":"0xFFFFFFFD","flags":["NotTrusted","Unencoded"],"blocks":[]},{"name":"StartPingCheck","frequency":"High","id":"1","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"PingID","type":"Single","count":1,"params":[{"name":"PingID","type":"U8","size":1},{"name":"OldestUnacked","type":"U32","size":1}]}]},{"name":"CompletePingCheck","frequency":"High","id":"2","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"PingID","type":"Single","count":1,"params":[{"name":"PingID","type":"U8","size":1}]}]},{"name":"AddCircuitCode","frequency":"Low","id":"2","flags":["Trusted","Unencoded"],"blocks":[{"name":"CircuitCode","type":"Single","count":1,"params":[{"name":"Code","type":"U32","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"AgentID","type":"LLUUID","size":1}]}]},{"name":"UseCircuitCode","frequency":"Low","id":"3","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"CircuitCode","type":"Single","count":1,"params":[{"name":"Code","type":"U32","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"ID","type":"LLUUID","size":1}]}]},{"name":"NeighborList","frequency":"High","id":"3","flags":["Trusted","Unencoded"],"blocks":[{"name":"NeighborBlock","type":"Multiple","count":"4","params":[{"name":"IP","type":"IPADDR","size":1},{"name":"Port","type":"IPPORT","size":1},{"name":"PublicIP","type":"IPADDR","size":1},{"name":"PublicPort","type":"IPPORT","size":1},{"name":"RegionID","type":"LLUUID","size":1},{"name":"Name","type":"Variable","size":"1"},{"name":"SimAccess","type":"U8","size":1}]}]},{"name":"AvatarTextureUpdate","frequency":"Low","id":"4","flags":["Trusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"TexturesChanged","type":"BOOL","size":1}]},{"name":"WearableData","type":"Variable","count":1,"params":[{"name":"CacheID","type":"LLUUID","size":1},{"name":"TextureIndex","type":"U8","size":1},{"name":"HostName","type":"Variable","size":"1"}]},{"name":"TextureData","type":"Variable","count":1,"params":[{"name":"TextureID","type":"LLUUID","size":1}]}]},{"name":"SimulatorMapUpdate","frequency":"Low","id":"5","flags":["Trusted","Unencoded"],"blocks":[{"name":"MapData","type":"Single","count":1,"params":[{"name":"Flags","type":"U32","size":1}]}]},{"name":"SimulatorSetMap","frequency":"Low","id":"6","flags":["Trusted","Unencoded"],"blocks":[{"name":"MapData","type":"Single","count":1,"params":[{"name":"RegionHandle","type":"U64","size":1},{"name":"Type","type":"S32","size":1},{"name":"MapImage","type":"LLUUID","size":1}]}]},{"name":"SubscribeLoad","frequency":"Low","id":"7","flags":["Trusted","Unencoded"],"blocks":[]},{"name":"UnsubscribeLoad","frequency":"Low","id":"8","flags":["Trusted","Unencoded"],"blocks":[]},{"name":"SimulatorReady","frequency":"Low","id":"9","flags":["Trusted","Zerocoded"],"blocks":[{"name":"SimulatorBlock","type":"Single","count":1,"params":[{"name":"SimName","type":"Variable","size":"1"},{"name":"SimAccess","type":"U8","size":1},{"name":"RegionFlags","type":"U32","size":1},{"name":"RegionID","type":"LLUUID","size":1},{"name":"EstateID","type":"U32","size":1},{"name":"ParentEstateID","type":"U32","size":1}]},{"name":"TelehubBlock","type":"Single","count":1,"params":[{"name":"HasTelehub","type":"BOOL","size":1},{"name":"TelehubPos","type":"LLVector3","size":1}]}]},{"name":"TelehubInfo","frequency":"Low","id":"10","flags":["Trusted","Unencoded"],"blocks":[{"name":"TelehubBlock","type":"Single","count":1,"params":[{"name":"ObjectID","type":"LLUUID","size":1},{"name":"ObjectName","type":"Variable","size":"1"},{"name":"TelehubPos","type":"LLVector3","size":1},{"name":"TelehubRot","type":"LLQuaternion","size":1}]},{"name":"SpawnPointBlock","type":"Variable","count":1,"params":[{"name":"SpawnPointPos","type":"LLVector3","size":1}]}]},{"name":"SimulatorPresentAtLocation","frequency":"Low","id":"11","flags":["Trusted","Unencoded"],"blocks":[{"name":"SimulatorPublicHostBlock","type":"Single","count":1,"params":[{"name":"Port","type":"IPPORT","size":1},{"name":"SimulatorIP","type":"IPADDR","size":1},{"name":"GridX","type":"U32","size":1},{"name":"GridY","type":"U32","size":1}]},{"name":"NeighborBlock","type":"Multiple","count":"4","params":[{"name":"IP","type":"IPADDR","size":1},{"name":"Port","type":"IPPORT","size":1}]},{"name":"SimulatorBlock","type":"Single","count":1,"params":[{"name":"SimName","type":"Variable","size":"1"},{"name":"SimAccess","type":"U8","size":1},{"name":"RegionFlags","type":"U32","size":1},{"name":"RegionID","type":"LLUUID","size":1},{"name":"EstateID","type":"U32","size":1},{"name":"ParentEstateID","type":"U32","size":1}]},{"name":"TelehubBlock","type":"Variable","count":1,"params":[{"name":"HasTelehub","type":"BOOL","size":1},{"name":"TelehubPos","type":"LLVector3","size":1}]}]},{"name":"SimulatorLoad","frequency":"Low","id":"12","flags":["Trusted","Unencoded"],"blocks":[{"name":"SimulatorLoad","type":"Single","count":1,"params":[{"name":"TimeDilation","type":"F32","size":1},{"name":"AgentCount","type":"S32","size":1},{"name":"CanAcceptAgents","type":"BOOL","size":1}]},{"name":"AgentList","type":"Variable","count":1,"params":[{"name":"CircuitCode","type":"U32","size":1},{"name":"X","type":"U8","size":1},{"name":"Y","type":"U8","size":1}]}]},{"name":"SimulatorShutdownRequest","frequency":"Low","id":"13","flags":["Trusted","Unencoded"],"blocks":[]},{"name":"RegionPresenceRequestByRegionID","frequency":"Low","id":"14","flags":["Trusted","Unencoded"],"blocks":[{"name":"RegionData","type":"Variable","count":1,"params":[{"name":"RegionID","type":"LLUUID","size":1}]}]},{"name":"RegionPresenceRequestByHandle","frequency":"Low","id":"15","flags":["Trusted","Unencoded"],"blocks":[{"name":"RegionData","type":"Variable","count":1,"params":[{"name":"RegionHandle","type":"U64","size":1}]}]},{"name":"RegionPresenceResponse","frequency":"Low","id":"16","flags":["Trusted","Zerocoded"],"blocks":[{"name":"RegionData","type":"Variable","count":1,"params":[{"name":"RegionID","type":"LLUUID","size":1},{"name":"RegionHandle","type":"U64","size":1},{"name":"InternalRegionIP","type":"IPADDR","size":1},{"name":"ExternalRegionIP","type":"IPADDR","size":1},{"name":"RegionPort","type":"IPPORT","size":1},{"name":"ValidUntil","type":"F64","size":1},{"name":"Message","type":"Variable","size":"1"}]}]},{"name":"UpdateSimulator","frequency":"Low","id":"17","flags":["Trusted","Unencoded"],"blocks":[{"name":"SimulatorInfo","type":"Single","count":1,"params":[{"name":"RegionID","type":"LLUUID","size":1},{"name":"SimName","type":"Variable","size":"1"},{"name":"EstateID","type":"U32","size":1},{"name":"SimAccess","type":"U8","size":1}]}]},{"name":"LogDwellTime","frequency":"Low","id":"18","flags":["Trusted","Unencoded"],"blocks":[{"name":"DwellInfo","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"Duration","type":"F32","size":1},{"name":"SimName","type":"Variable","size":"1"},{"name":"RegionX","type":"U32","size":1},{"name":"RegionY","type":"U32","size":1},{"name":"AvgAgentsInView","type":"U8","size":1},{"name":"AvgViewerFPS","type":"U8","size":1}]}]},{"name":"FeatureDisabled","frequency":"Low","id":"19","flags":["Trusted","Unencoded"],"blocks":[{"name":"FailureInfo","type":"Single","count":1,"params":[{"name":"ErrorMessage","type":"Variable","size":"1"},{"name":"AgentID","type":"LLUUID","size":1},{"name":"TransactionID","type":"LLUUID","size":1}]}]},{"name":"LogFailedMoneyTransaction","frequency":"Low","id":"20","flags":["Trusted","Unencoded"],"blocks":[{"name":"TransactionData","type":"Single","count":1,"params":[{"name":"TransactionID","type":"LLUUID","size":1},{"name":"TransactionTime","type":"U32","size":1},{"name":"TransactionType","type":"S32","size":1},{"name":"SourceID","type":"LLUUID","size":1},{"name":"DestID","type":"LLUUID","size":1},{"name":"Flags","type":"U8","size":1},{"name":"Amount","type":"S32","size":1},{"name":"SimulatorIP","type":"IPADDR","size":1},{"name":"GridX","type":"U32","size":1},{"name":"GridY","type":"U32","size":1},{"name":"FailureType","type":"U8","size":1}]}]},{"name":"UserReportInternal","frequency":"Low","id":"21","flags":["Trusted","Zerocoded"],"blocks":[{"name":"ReportData","type":"Single","count":1,"params":[{"name":"ReportType","type":"U8","size":1},{"name":"Category","type":"U8","size":1},{"name":"ReporterID","type":"LLUUID","size":1},{"name":"ViewerPosition","type":"LLVector3","size":1},{"name":"AgentPosition","type":"LLVector3","size":1},{"name":"ScreenshotID","type":"LLUUID","size":1},{"name":"ObjectID","type":"LLUUID","size":1},{"name":"OwnerID","type":"LLUUID","size":1},{"name":"LastOwnerID","type":"LLUUID","size":1},{"name":"CreatorID","type":"LLUUID","size":1},{"name":"RegionID","type":"LLUUID","size":1},{"name":"AbuserID","type":"LLUUID","size":1},{"name":"AbuseRegionName","type":"Variable","size":"1"},{"name":"AbuseRegionID","type":"LLUUID","size":1},{"name":"Summary","type":"Variable","size":"1"},{"name":"Details","type":"Variable","size":"2"},{"name":"VersionString","type":"Variable","size":"1"}]}]},{"name":"SetSimStatusInDatabase","frequency":"Low","id":"22","flags":["Trusted","Unencoded"],"blocks":[{"name":"Data","type":"Single","count":1,"params":[{"name":"RegionID","type":"LLUUID","size":1},{"name":"HostName","type":"Variable","size":"1"},{"name":"X","type":"S32","size":1},{"name":"Y","type":"S32","size":1},{"name":"PID","type":"S32","size":1},{"name":"AgentCount","type":"S32","size":1},{"name":"TimeToLive","type":"S32","size":1},{"name":"Status","type":"Variable","size":"1"}]}]},{"name":"SetSimPresenceInDatabase","frequency":"Low","id":"23","flags":["Trusted","Unencoded","UDPDeprecated"],"blocks":[{"name":"SimData","type":"Single","count":1,"params":[{"name":"RegionID","type":"LLUUID","size":1},{"name":"HostName","type":"Variable","size":"1"},{"name":"GridX","type":"U32","size":1},{"name":"GridY","type":"U32","size":1},{"name":"PID","type":"S32","size":1},{"name":"AgentCount","type":"S32","size":1},{"name":"TimeToLive","type":"S32","size":1},{"name":"Status","type":"Variable","size":"1"}]}]},{"name":"EconomyDataRequest","frequency":"Low","id":"24","flags":["NotTrusted","Unencoded"],"blocks":[]},{"name":"EconomyData","frequency":"Low","id":"25","flags":["Trusted","Zerocoded"],"blocks":[{"name":"Info","type":"Single","count":1,"params":[{"name":"ObjectCapacity","type":"S32","size":1},{"name":"ObjectCount","type":"S32","size":1},{"name":"PriceEnergyUnit","type":"S32","size":1},{"name":"PriceObjectClaim","type":"S32","size":1},{"name":"PricePublicObjectDecay","type":"S32","size":1},{"name":"PricePublicObjectDelete","type":"S32","size":1},{"name":"PriceParcelClaim","type":"S32","size":1},{"name":"PriceParcelClaimFactor","type":"F32","size":1},{"name":"PriceUpload","type":"S32","size":1},{"name":"PriceRentLight","type":"S32","size":1},{"name":"TeleportMinPrice","type":"S32","size":1},{"name":"TeleportPriceExponent","type":"F32","size":1},{"name":"EnergyEfficiency","type":"F32","size":1},{"name":"PriceObjectRent","type":"F32","size":1},{"name":"PriceObjectScaleFactor","type":"F32","size":1},{"name":"PriceParcelRent","type":"S32","size":1},{"name":"PriceGroupCreate","type":"S32","size":1}]}]},{"name":"AvatarPickerRequest","frequency":"Low","id":"26","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"QueryID","type":"LLUUID","size":1}]},{"name":"Data","type":"Single","count":1,"params":[{"name":"Name","type":"Variable","size":"1"}]}]},{"name":"AvatarPickerRequestBackend","frequency":"Low","id":"27","flags":["Trusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"QueryID","type":"LLUUID","size":1},{"name":"GodLevel","type":"U8","size":1}]},{"name":"Data","type":"Single","count":1,"params":[{"name":"Name","type":"Variable","size":"1"}]}]},{"name":"AvatarPickerReply","frequency":"Low","id":"28","flags":["Trusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"QueryID","type":"LLUUID","size":1}]},{"name":"Data","type":"Variable","count":1,"params":[{"name":"AvatarID","type":"LLUUID","size":1},{"name":"FirstName","type":"Variable","size":"1"},{"name":"LastName","type":"Variable","size":"1"}]}]},{"name":"PlacesQuery","frequency":"Low","id":"29","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"QueryID","type":"LLUUID","size":1}]},{"name":"TransactionData","type":"Single","count":1,"params":[{"name":"TransactionID","type":"LLUUID","size":1}]},{"name":"QueryData","type":"Single","count":1,"params":[{"name":"QueryText","type":"Variable","size":"1"},{"name":"QueryFlags","type":"U32","size":1},{"name":"Category","type":"S8","size":1},{"name":"SimName","type":"Variable","size":"1"}]}]},{"name":"PlacesReply","frequency":"Low","id":"30","flags":["Trusted","Zerocoded","UDPDeprecated"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"QueryID","type":"LLUUID","size":1}]},{"name":"TransactionData","type":"Single","count":1,"params":[{"name":"TransactionID","type":"LLUUID","size":1}]},{"name":"QueryData","type":"Variable","count":1,"params":[{"name":"OwnerID","type":"LLUUID","size":1},{"name":"Name","type":"Variable","size":"1"},{"name":"Desc","type":"Variable","size":"1"},{"name":"ActualArea","type":"S32","size":1},{"name":"BillableArea","type":"S32","size":1},{"name":"Flags","type":"U8","size":1},{"name":"GlobalX","type":"F32","size":1},{"name":"GlobalY","type":"F32","size":1},{"name":"GlobalZ","type":"F32","size":1},{"name":"SimName","type":"Variable","size":"1"},{"name":"SnapshotID","type":"LLUUID","size":1},{"name":"Dwell","type":"F32","size":1},{"name":"Price","type":"S32","size":1},{"name":"ProductSKU","type":"Variable","size":"1"}]}]},{"name":"DirFindQuery","frequency":"Low","id":"31","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"QueryData","type":"Single","count":1,"params":[{"name":"QueryID","type":"LLUUID","size":1},{"name":"QueryText","type":"Variable","size":"1"},{"name":"QueryFlags","type":"U32","size":1},{"name":"QueryStart","type":"S32","size":1}]}]},{"name":"DirFindQueryBackend","frequency":"Low","id":"32","flags":["Trusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1}]},{"name":"QueryData","type":"Single","count":1,"params":[{"name":"QueryID","type":"LLUUID","size":1},{"name":"QueryText","type":"Variable","size":"1"},{"name":"QueryFlags","type":"U32","size":1},{"name":"QueryStart","type":"S32","size":1},{"name":"EstateID","type":"U32","size":1},{"name":"Godlike","type":"BOOL","size":1}]}]},{"name":"DirPlacesQuery","frequency":"Low","id":"33","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"QueryData","type":"Single","count":1,"params":[{"name":"QueryID","type":"LLUUID","size":1},{"name":"QueryText","type":"Variable","size":"1"},{"name":"QueryFlags","type":"U32","size":1},{"name":"Category","type":"S8","size":1},{"name":"SimName","type":"Variable","size":"1"},{"name":"QueryStart","type":"S32","size":1}]}]},{"name":"DirPlacesQueryBackend","frequency":"Low","id":"34","flags":["Trusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1}]},{"name":"QueryData","type":"Single","count":1,"params":[{"name":"QueryID","type":"LLUUID","size":1},{"name":"QueryText","type":"Variable","size":"1"},{"name":"QueryFlags","type":"U32","size":1},{"name":"Category","type":"S8","size":1},{"name":"SimName","type":"Variable","size":"1"},{"name":"EstateID","type":"U32","size":1},{"name":"Godlike","type":"BOOL","size":1},{"name":"QueryStart","type":"S32","size":1}]}]},{"name":"DirPlacesReply","frequency":"Low","id":"35","flags":["Trusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1}]},{"name":"QueryData","type":"Variable","count":1,"params":[{"name":"QueryID","type":"LLUUID","size":1}]},{"name":"QueryReplies","type":"Variable","count":1,"params":[{"name":"ParcelID","type":"LLUUID","size":1},{"name":"Name","type":"Variable","size":"1"},{"name":"ForSale","type":"BOOL","size":1},{"name":"Auction","type":"BOOL","size":1},{"name":"Dwell","type":"F32","size":1}]},{"name":"StatusData","type":"Variable","count":1,"params":[{"name":"Status","type":"U32","size":1}]}]},{"name":"DirPeopleReply","frequency":"Low","id":"36","flags":["Trusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1}]},{"name":"QueryData","type":"Single","count":1,"params":[{"name":"QueryID","type":"LLUUID","size":1}]},{"name":"QueryReplies","type":"Variable","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"FirstName","type":"Variable","size":"1"},{"name":"LastName","type":"Variable","size":"1"},{"name":"Group","type":"Variable","size":"1"},{"name":"Online","type":"BOOL","size":1},{"name":"Reputation","type":"S32","size":1}]}]},{"name":"DirEventsReply","frequency":"Low","id":"37","flags":["Trusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1}]},{"name":"QueryData","type":"Single","count":1,"params":[{"name":"QueryID","type":"LLUUID","size":1}]},{"name":"QueryReplies","type":"Variable","count":1,"params":[{"name":"OwnerID","type":"LLUUID","size":1},{"name":"Name","type":"Variable","size":"1"},{"name":"EventID","type":"U32","size":1},{"name":"Date","type":"Variable","size":"1"},{"name":"UnixTime","type":"U32","size":1},{"name":"EventFlags","type":"U32","size":1}]},{"name":"StatusData","type":"Variable","count":1,"params":[{"name":"Status","type":"U32","size":1}]}]},{"name":"DirGroupsReply","frequency":"Low","id":"38","flags":["Trusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1}]},{"name":"QueryData","type":"Single","count":1,"params":[{"name":"QueryID","type":"LLUUID","size":1}]},{"name":"QueryReplies","type":"Variable","count":1,"params":[{"name":"GroupID","type":"LLUUID","size":1},{"name":"GroupName","type":"Variable","size":"1"},{"name":"Members","type":"S32","size":1},{"name":"SearchOrder","type":"F32","size":1}]}]},{"name":"DirClassifiedQuery","frequency":"Low","id":"39","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"QueryData","type":"Single","count":1,"params":[{"name":"QueryID","type":"LLUUID","size":1},{"name":"QueryText","type":"Variable","size":"1"},{"name":"QueryFlags","type":"U32","size":1},{"name":"Category","type":"U32","size":1},{"name":"QueryStart","type":"S32","size":1}]}]},{"name":"DirClassifiedQueryBackend","frequency":"Low","id":"40","flags":["Trusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1}]},{"name":"QueryData","type":"Single","count":1,"params":[{"name":"QueryID","type":"LLUUID","size":1},{"name":"QueryText","type":"Variable","size":"1"},{"name":"QueryFlags","type":"U32","size":1},{"name":"Category","type":"U32","size":1},{"name":"EstateID","type":"U32","size":1},{"name":"Godlike","type":"BOOL","size":1},{"name":"QueryStart","type":"S32","size":1}]}]},{"name":"DirClassifiedReply","frequency":"Low","id":"41","flags":["Trusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1}]},{"name":"QueryData","type":"Single","count":1,"params":[{"name":"QueryID","type":"LLUUID","size":1}]},{"name":"QueryReplies","type":"Variable","count":1,"params":[{"name":"ClassifiedID","type":"LLUUID","size":1},{"name":"Name","type":"Variable","size":"1"},{"name":"ClassifiedFlags","type":"U8","size":1},{"name":"CreationDate","type":"U32","size":1},{"name":"ExpirationDate","type":"U32","size":1},{"name":"PriceForListing","type":"S32","size":1}]},{"name":"StatusData","type":"Variable","count":1,"params":[{"name":"Status","type":"U32","size":1}]}]},{"name":"AvatarClassifiedReply","frequency":"Low","id":"42","flags":["Trusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"TargetID","type":"LLUUID","size":1}]},{"name":"Data","type":"Variable","count":1,"params":[{"name":"ClassifiedID","type":"LLUUID","size":1},{"name":"Name","type":"Variable","size":"1"}]}]},{"name":"ClassifiedInfoRequest","frequency":"Low","id":"43","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"Data","type":"Single","count":1,"params":[{"name":"ClassifiedID","type":"LLUUID","size":1}]}]},{"name":"ClassifiedInfoReply","frequency":"Low","id":"44","flags":["Trusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1}]},{"name":"Data","type":"Single","count":1,"params":[{"name":"ClassifiedID","type":"LLUUID","size":1},{"name":"CreatorID","type":"LLUUID","size":1},{"name":"CreationDate","type":"U32","size":1},{"name":"ExpirationDate","type":"U32","size":1},{"name":"Category","type":"U32","size":1},{"name":"Name","type":"Variable","size":"1"},{"name":"Desc","type":"Variable","size":"2"},{"name":"ParcelID","type":"LLUUID","size":1},{"name":"ParentEstate","type":"U32","size":1},{"name":"SnapshotID","type":"LLUUID","size":1},{"name":"SimName","type":"Variable","size":"1"},{"name":"PosGlobal","type":"LLVector3d","size":1},{"name":"ParcelName","type":"Variable","size":"1"},{"name":"ClassifiedFlags","type":"U8","size":1},{"name":"PriceForListing","type":"S32","size":1}]}]},{"name":"ClassifiedInfoUpdate","frequency":"Low","id":"45","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"Data","type":"Single","count":1,"params":[{"name":"ClassifiedID","type":"LLUUID","size":1},{"name":"Category","type":"U32","size":1},{"name":"Name","type":"Variable","size":"1"},{"name":"Desc","type":"Variable","size":"2"},{"name":"ParcelID","type":"LLUUID","size":1},{"name":"ParentEstate","type":"U32","size":1},{"name":"SnapshotID","type":"LLUUID","size":1},{"name":"PosGlobal","type":"LLVector3d","size":1},{"name":"ClassifiedFlags","type":"U8","size":1},{"name":"PriceForListing","type":"S32","size":1}]}]},{"name":"ClassifiedDelete","frequency":"Low","id":"46","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"Data","type":"Single","count":1,"params":[{"name":"ClassifiedID","type":"LLUUID","size":1}]}]},{"name":"ClassifiedGodDelete","frequency":"Low","id":"47","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"Data","type":"Single","count":1,"params":[{"name":"ClassifiedID","type":"LLUUID","size":1},{"name":"QueryID","type":"LLUUID","size":1}]}]},{"name":"DirLandQuery","frequency":"Low","id":"48","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"QueryData","type":"Single","count":1,"params":[{"name":"QueryID","type":"LLUUID","size":1},{"name":"QueryFlags","type":"U32","size":1},{"name":"SearchType","type":"U32","size":1},{"name":"Price","type":"S32","size":1},{"name":"Area","type":"S32","size":1},{"name":"QueryStart","type":"S32","size":1}]}]},{"name":"DirLandQueryBackend","frequency":"Low","id":"49","flags":["Trusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1}]},{"name":"QueryData","type":"Single","count":1,"params":[{"name":"QueryID","type":"LLUUID","size":1},{"name":"QueryFlags","type":"U32","size":1},{"name":"SearchType","type":"U32","size":1},{"name":"Price","type":"S32","size":1},{"name":"Area","type":"S32","size":1},{"name":"QueryStart","type":"S32","size":1},{"name":"EstateID","type":"U32","size":1},{"name":"Godlike","type":"BOOL","size":1}]}]},{"name":"DirLandReply","frequency":"Low","id":"50","flags":["Trusted","Zerocoded","UDPDeprecated"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1}]},{"name":"QueryData","type":"Single","count":1,"params":[{"name":"QueryID","type":"LLUUID","size":1}]},{"name":"QueryReplies","type":"Variable","count":1,"params":[{"name":"ParcelID","type":"LLUUID","size":1},{"name":"Name","type":"Variable","size":"1"},{"name":"Auction","type":"BOOL","size":1},{"name":"ForSale","type":"BOOL","size":1},{"name":"SalePrice","type":"S32","size":1},{"name":"ActualArea","type":"S32","size":1},{"name":"ProductSKU","type":"Variable","size":"1"}]}]},{"name":"DirPopularQuery","frequency":"Low","id":"51","flags":["NotTrusted","Zerocoded","Deprecated"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"QueryData","type":"Single","count":1,"params":[{"name":"QueryID","type":"LLUUID","size":1},{"name":"QueryFlags","type":"U32","size":1}]}]},{"name":"DirPopularQueryBackend","frequency":"Low","id":"52","flags":["Trusted","Zerocoded","Deprecated"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1}]},{"name":"QueryData","type":"Single","count":1,"params":[{"name":"QueryID","type":"LLUUID","size":1},{"name":"QueryFlags","type":"U32","size":1},{"name":"EstateID","type":"U32","size":1},{"name":"Godlike","type":"BOOL","size":1}]}]},{"name":"DirPopularReply","frequency":"Low","id":"53","flags":["Trusted","Zerocoded","Deprecated"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1}]},{"name":"QueryData","type":"Single","count":1,"params":[{"name":"QueryID","type":"LLUUID","size":1}]},{"name":"QueryReplies","type":"Variable","count":1,"params":[{"name":"ParcelID","type":"LLUUID","size":1},{"name":"Name","type":"Variable","size":"1"},{"name":"Dwell","type":"F32","size":1}]}]},{"name":"ParcelInfoRequest","frequency":"Low","id":"54","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"Data","type":"Single","count":1,"params":[{"name":"ParcelID","type":"LLUUID","size":1}]}]},{"name":"ParcelInfoReply","frequency":"Low","id":"55","flags":["Trusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1}]},{"name":"Data","type":"Single","count":1,"params":[{"name":"ParcelID","type":"LLUUID","size":1},{"name":"OwnerID","type":"LLUUID","size":1},{"name":"Name","type":"Variable","size":"1"},{"name":"Desc","type":"Variable","size":"1"},{"name":"ActualArea","type":"S32","size":1},{"name":"BillableArea","type":"S32","size":1},{"name":"Flags","type":"U8","size":1},{"name":"GlobalX","type":"F32","size":1},{"name":"GlobalY","type":"F32","size":1},{"name":"GlobalZ","type":"F32","size":1},{"name":"SimName","type":"Variable","size":"1"},{"name":"SnapshotID","type":"LLUUID","size":1},{"name":"Dwell","type":"F32","size":1},{"name":"SalePrice","type":"S32","size":1},{"name":"AuctionID","type":"S32","size":1}]}]},{"name":"ParcelObjectOwnersRequest","frequency":"Low","id":"56","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"ParcelData","type":"Single","count":1,"params":[{"name":"LocalID","type":"S32","size":1}]}]},{"name":"ParcelObjectOwnersReply","frequency":"Low","id":"57","flags":["Trusted","Zerocoded","UDPDeprecated"],"blocks":[{"name":"Data","type":"Variable","count":1,"params":[{"name":"OwnerID","type":"LLUUID","size":1},{"name":"IsGroupOwned","type":"BOOL","size":1},{"name":"Count","type":"S32","size":1},{"name":"OnlineStatus","type":"BOOL","size":1}]}]},{"name":"GroupNoticesListRequest","frequency":"Low","id":"58","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"Data","type":"Single","count":1,"params":[{"name":"GroupID","type":"LLUUID","size":1}]}]},{"name":"GroupNoticesListReply","frequency":"Low","id":"59","flags":["Trusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"GroupID","type":"LLUUID","size":1}]},{"name":"Data","type":"Variable","count":1,"params":[{"name":"NoticeID","type":"LLUUID","size":1},{"name":"Timestamp","type":"U32","size":1},{"name":"FromName","type":"Variable","size":"2"},{"name":"Subject","type":"Variable","size":"2"},{"name":"HasAttachment","type":"BOOL","size":1},{"name":"AssetType","type":"U8","size":1}]}]},{"name":"GroupNoticeRequest","frequency":"Low","id":"60","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"Data","type":"Single","count":1,"params":[{"name":"GroupNoticeID","type":"LLUUID","size":1}]}]},{"name":"GroupNoticeAdd","frequency":"Low","id":"61","flags":["Trusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1}]},{"name":"MessageBlock","type":"Single","count":1,"params":[{"name":"ToGroupID","type":"LLUUID","size":1},{"name":"ID","type":"LLUUID","size":1},{"name":"Dialog","type":"U8","size":1},{"name":"FromAgentName","type":"Variable","size":"1"},{"name":"Message","type":"Variable","size":"2"},{"name":"BinaryBucket","type":"Variable","size":"2"}]}]},{"name":"TeleportRequest","frequency":"Low","id":"62","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"Info","type":"Single","count":1,"params":[{"name":"RegionID","type":"LLUUID","size":1},{"name":"Position","type":"LLVector3","size":1},{"name":"LookAt","type":"LLVector3","size":1}]}]},{"name":"TeleportLocationRequest","frequency":"Low","id":"63","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"Info","type":"Single","count":1,"params":[{"name":"RegionHandle","type":"U64","size":1},{"name":"Position","type":"LLVector3","size":1},{"name":"LookAt","type":"LLVector3","size":1}]}]},{"name":"TeleportLocal","frequency":"Low","id":"64","flags":["Trusted","Unencoded"],"blocks":[{"name":"Info","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"LocationID","type":"U32","size":1},{"name":"Position","type":"LLVector3","size":1},{"name":"LookAt","type":"LLVector3","size":1},{"name":"TeleportFlags","type":"U32","size":1}]}]},{"name":"TeleportLandmarkRequest","frequency":"Low","id":"65","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"Info","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"LandmarkID","type":"LLUUID","size":1}]}]},{"name":"TeleportProgress","frequency":"Low","id":"66","flags":["Trusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1}]},{"name":"Info","type":"Single","count":1,"params":[{"name":"TeleportFlags","type":"U32","size":1},{"name":"Message","type":"Variable","size":"1"}]}]},{"name":"DataHomeLocationRequest","frequency":"Low","id":"67","flags":["Trusted","Zerocoded"],"blocks":[{"name":"Info","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"KickedFromEstateID","type":"U32","size":1}]},{"name":"AgentInfo","type":"Single","count":1,"params":[{"name":"AgentEffectiveMaturity","type":"U32","size":1}]}]},{"name":"DataHomeLocationReply","frequency":"Low","id":"68","flags":["Trusted","Unencoded"],"blocks":[{"name":"Info","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"RegionHandle","type":"U64","size":1},{"name":"Position","type":"LLVector3","size":1},{"name":"LookAt","type":"LLVector3","size":1}]}]},{"name":"TeleportFinish","frequency":"Low","id":"69","flags":["Trusted","Unencoded","UDPBlackListed"],"blocks":[{"name":"Info","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"LocationID","type":"U32","size":1},{"name":"SimIP","type":"IPADDR","size":1},{"name":"SimPort","type":"IPPORT","size":1},{"name":"RegionHandle","type":"U64","size":1},{"name":"SeedCapability","type":"Variable","size":"2"},{"name":"SimAccess","type":"U8","size":1},{"name":"TeleportFlags","type":"U32","size":1}]}]},{"name":"StartLure","frequency":"Low","id":"70","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"Info","type":"Single","count":1,"params":[{"name":"LureType","type":"U8","size":1},{"name":"Message","type":"Variable","size":"1"}]},{"name":"TargetData","type":"Variable","count":1,"params":[{"name":"TargetID","type":"LLUUID","size":1}]}]},{"name":"TeleportLureRequest","frequency":"Low","id":"71","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"Info","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"LureID","type":"LLUUID","size":1},{"name":"TeleportFlags","type":"U32","size":1}]}]},{"name":"TeleportCancel","frequency":"Low","id":"72","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"Info","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]}]},{"name":"TeleportStart","frequency":"Low","id":"73","flags":["Trusted","Unencoded"],"blocks":[{"name":"Info","type":"Single","count":1,"params":[{"name":"TeleportFlags","type":"U32","size":1}]}]},{"name":"TeleportFailed","frequency":"Low","id":"74","flags":["Trusted","Unencoded"],"blocks":[{"name":"Info","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"Reason","type":"Variable","size":"1"}]},{"name":"AlertInfo","type":"Variable","count":1,"params":[{"name":"Message","type":"Variable","size":"1"},{"name":"ExtraParams","type":"Variable","size":"1"}]}]},{"name":"Undo","frequency":"Low","id":"75","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"GroupID","type":"LLUUID","size":1}]},{"name":"ObjectData","type":"Variable","count":1,"params":[{"name":"ObjectID","type":"LLUUID","size":1}]}]},{"name":"Redo","frequency":"Low","id":"76","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"GroupID","type":"LLUUID","size":1}]},{"name":"ObjectData","type":"Variable","count":1,"params":[{"name":"ObjectID","type":"LLUUID","size":1}]}]},{"name":"UndoLand","frequency":"Low","id":"77","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]}]},{"name":"AgentPause","frequency":"Low","id":"78","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"SerialNum","type":"U32","size":1}]}]},{"name":"AgentResume","frequency":"Low","id":"79","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"SerialNum","type":"U32","size":1}]}]},{"name":"AgentUpdate","frequency":"High","id":"4","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"BodyRotation","type":"LLQuaternion","size":1},{"name":"HeadRotation","type":"LLQuaternion","size":1},{"name":"State","type":"U8","size":1},{"name":"CameraCenter","type":"LLVector3","size":1},{"name":"CameraAtAxis","type":"LLVector3","size":1},{"name":"CameraLeftAxis","type":"LLVector3","size":1},{"name":"CameraUpAxis","type":"LLVector3","size":1},{"name":"Far","type":"F32","size":1},{"name":"ControlFlags","type":"U32","size":1},{"name":"Flags","type":"U8","size":1}]}]},{"name":"ChatFromViewer","frequency":"Low","id":"80","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"ChatData","type":"Single","count":1,"params":[{"name":"Message","type":"Variable","size":"2"},{"name":"Type","type":"U8","size":1},{"name":"Channel","type":"S32","size":1}]}]},{"name":"AgentThrottle","frequency":"Low","id":"81","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"CircuitCode","type":"U32","size":1}]},{"name":"Throttle","type":"Single","count":1,"params":[{"name":"GenCounter","type":"U32","size":1},{"name":"Throttles","type":"Variable","size":"1"}]}]},{"name":"AgentFOV","frequency":"Low","id":"82","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"CircuitCode","type":"U32","size":1}]},{"name":"FOVBlock","type":"Single","count":1,"params":[{"name":"GenCounter","type":"U32","size":1},{"name":"VerticalAngle","type":"F32","size":1}]}]},{"name":"AgentHeightWidth","frequency":"Low","id":"83","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"CircuitCode","type":"U32","size":1}]},{"name":"HeightWidthBlock","type":"Single","count":1,"params":[{"name":"GenCounter","type":"U32","size":1},{"name":"Height","type":"U16","size":1},{"name":"Width","type":"U16","size":1}]}]},{"name":"AgentSetAppearance","frequency":"Low","id":"84","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"SerialNum","type":"U32","size":1},{"name":"Size","type":"LLVector3","size":1}]},{"name":"WearableData","type":"Variable","count":1,"params":[{"name":"CacheID","type":"LLUUID","size":1},{"name":"TextureIndex","type":"U8","size":1}]},{"name":"ObjectData","type":"Single","count":1,"params":[{"name":"TextureEntry","type":"Variable","size":"2"}]},{"name":"VisualParam","type":"Variable","count":1,"params":[{"name":"ParamValue","type":"U8","size":1}]}]},{"name":"AgentAnimation","frequency":"High","id":"5","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"AnimationList","type":"Variable","count":1,"params":[{"name":"AnimID","type":"LLUUID","size":1},{"name":"StartAnim","type":"BOOL","size":1}]},{"name":"PhysicalAvatarEventList","type":"Variable","count":1,"params":[{"name":"TypeData","type":"Variable","size":"1"}]}]},{"name":"AgentRequestSit","frequency":"High","id":"6","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"TargetObject","type":"Single","count":1,"params":[{"name":"TargetID","type":"LLUUID","size":1},{"name":"Offset","type":"LLVector3","size":1}]}]},{"name":"AgentSit","frequency":"High","id":"7","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]}]},{"name":"AgentQuitCopy","frequency":"Low","id":"85","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"FuseBlock","type":"Single","count":1,"params":[{"name":"ViewerCircuitCode","type":"U32","size":1}]}]},{"name":"RequestImage","frequency":"High","id":"8","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"RequestImage","type":"Variable","count":1,"params":[{"name":"Image","type":"LLUUID","size":1},{"name":"DiscardLevel","type":"S8","size":1},{"name":"DownloadPriority","type":"F32","size":1},{"name":"Packet","type":"U32","size":1},{"name":"Type","type":"U8","size":1}]}]},{"name":"ImageNotInDatabase","frequency":"Low","id":"86","flags":["Trusted","Unencoded"],"blocks":[{"name":"ImageID","type":"Single","count":1,"params":[{"name":"ID","type":"LLUUID","size":1}]}]},{"name":"RebakeAvatarTextures","frequency":"Low","id":"87","flags":["Trusted","Unencoded"],"blocks":[{"name":"TextureData","type":"Single","count":1,"params":[{"name":"TextureID","type":"LLUUID","size":1}]}]},{"name":"SetAlwaysRun","frequency":"Low","id":"88","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"AlwaysRun","type":"BOOL","size":1}]}]},{"name":"ObjectAdd","frequency":"Medium","id":"1","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"GroupID","type":"LLUUID","size":1}]},{"name":"ObjectData","type":"Single","count":1,"params":[{"name":"PCode","type":"U8","size":1},{"name":"Material","type":"U8","size":1},{"name":"AddFlags","type":"U32","size":1},{"name":"PathCurve","type":"U8","size":1},{"name":"ProfileCurve","type":"U8","size":1},{"name":"PathBegin","type":"U16","size":1},{"name":"PathEnd","type":"U16","size":1},{"name":"PathScaleX","type":"U8","size":1},{"name":"PathScaleY","type":"U8","size":1},{"name":"PathShearX","type":"U8","size":1},{"name":"PathShearY","type":"U8","size":1},{"name":"PathTwist","type":"S8","size":1},{"name":"PathTwistBegin","type":"S8","size":1},{"name":"PathRadiusOffset","type":"S8","size":1},{"name":"PathTaperX","type":"S8","size":1},{"name":"PathTaperY","type":"S8","size":1},{"name":"PathRevolutions","type":"U8","size":1},{"name":"PathSkew","type":"S8","size":1},{"name":"ProfileBegin","type":"U16","size":1},{"name":"ProfileEnd","type":"U16","size":1},{"name":"ProfileHollow","type":"U16","size":1},{"name":"BypassRaycast","type":"U8","size":1},{"name":"RayStart","type":"LLVector3","size":1},{"name":"RayEnd","type":"LLVector3","size":1},{"name":"RayTargetID","type":"LLUUID","size":1},{"name":"RayEndIsIntersection","type":"U8","size":1},{"name":"Scale","type":"LLVector3","size":1},{"name":"Rotation","type":"LLQuaternion","size":1},{"name":"State","type":"U8","size":1}]}]},{"name":"ObjectDelete","frequency":"Low","id":"89","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"Force","type":"BOOL","size":1}]},{"name":"ObjectData","type":"Variable","count":1,"params":[{"name":"ObjectLocalID","type":"U32","size":1}]}]},{"name":"ObjectDuplicate","frequency":"Low","id":"90","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"GroupID","type":"LLUUID","size":1}]},{"name":"SharedData","type":"Single","count":1,"params":[{"name":"Offset","type":"LLVector3","size":1},{"name":"DuplicateFlags","type":"U32","size":1}]},{"name":"ObjectData","type":"Variable","count":1,"params":[{"name":"ObjectLocalID","type":"U32","size":1}]}]},{"name":"ObjectDuplicateOnRay","frequency":"Low","id":"91","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"GroupID","type":"LLUUID","size":1},{"name":"RayStart","type":"LLVector3","size":1},{"name":"RayEnd","type":"LLVector3","size":1},{"name":"BypassRaycast","type":"BOOL","size":1},{"name":"RayEndIsIntersection","type":"BOOL","size":1},{"name":"CopyCenters","type":"BOOL","size":1},{"name":"CopyRotates","type":"BOOL","size":1},{"name":"RayTargetID","type":"LLUUID","size":1},{"name":"DuplicateFlags","type":"U32","size":1}]},{"name":"ObjectData","type":"Variable","count":1,"params":[{"name":"ObjectLocalID","type":"U32","size":1}]}]},{"name":"MultipleObjectUpdate","frequency":"Medium","id":"2","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"ObjectData","type":"Variable","count":1,"params":[{"name":"ObjectLocalID","type":"U32","size":1},{"name":"Type","type":"U8","size":1},{"name":"Data","type":"Variable","size":"1"}]}]},{"name":"RequestMultipleObjects","frequency":"Medium","id":"3","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"ObjectData","type":"Variable","count":1,"params":[{"name":"CacheMissType","type":"U8","size":1},{"name":"ID","type":"U32","size":1}]}]},{"name":"ObjectPosition","frequency":"Medium","id":"4","flags":["NotTrusted","Zerocoded","Deprecated"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"ObjectData","type":"Variable","count":1,"params":[{"name":"ObjectLocalID","type":"U32","size":1},{"name":"Position","type":"LLVector3","size":1}]}]},{"name":"ObjectScale","frequency":"Low","id":"92","flags":["NotTrusted","Zerocoded","Deprecated"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"ObjectData","type":"Variable","count":1,"params":[{"name":"ObjectLocalID","type":"U32","size":1},{"name":"Scale","type":"LLVector3","size":1}]}]},{"name":"ObjectRotation","frequency":"Low","id":"93","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"ObjectData","type":"Variable","count":1,"params":[{"name":"ObjectLocalID","type":"U32","size":1},{"name":"Rotation","type":"LLQuaternion","size":1}]}]},{"name":"ObjectFlagUpdate","frequency":"Low","id":"94","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"ObjectLocalID","type":"U32","size":1},{"name":"UsePhysics","type":"BOOL","size":1},{"name":"IsTemporary","type":"BOOL","size":1},{"name":"IsPhantom","type":"BOOL","size":1},{"name":"CastsShadows","type":"BOOL","size":1}]},{"name":"ExtraPhysics","type":"Variable","count":1,"params":[{"name":"PhysicsShapeType","type":"U8","size":1},{"name":"Density","type":"F32","size":1},{"name":"Friction","type":"F32","size":1},{"name":"Restitution","type":"F32","size":1},{"name":"GravityMultiplier","type":"F32","size":1}]}]},{"name":"ObjectClickAction","frequency":"Low","id":"95","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"ObjectData","type":"Variable","count":1,"params":[{"name":"ObjectLocalID","type":"U32","size":1},{"name":"ClickAction","type":"U8","size":1}]}]},{"name":"ObjectImage","frequency":"Low","id":"96","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"ObjectData","type":"Variable","count":1,"params":[{"name":"ObjectLocalID","type":"U32","size":1},{"name":"MediaURL","type":"Variable","size":"1"},{"name":"TextureEntry","type":"Variable","size":"2"}]}]},{"name":"ObjectMaterial","frequency":"Low","id":"97","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"ObjectData","type":"Variable","count":1,"params":[{"name":"ObjectLocalID","type":"U32","size":1},{"name":"Material","type":"U8","size":1}]}]},{"name":"ObjectShape","frequency":"Low","id":"98","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"ObjectData","type":"Variable","count":1,"params":[{"name":"ObjectLocalID","type":"U32","size":1},{"name":"PathCurve","type":"U8","size":1},{"name":"ProfileCurve","type":"U8","size":1},{"name":"PathBegin","type":"U16","size":1},{"name":"PathEnd","type":"U16","size":1},{"name":"PathScaleX","type":"U8","size":1},{"name":"PathScaleY","type":"U8","size":1},{"name":"PathShearX","type":"U8","size":1},{"name":"PathShearY","type":"U8","size":1},{"name":"PathTwist","type":"S8","size":1},{"name":"PathTwistBegin","type":"S8","size":1},{"name":"PathRadiusOffset","type":"S8","size":1},{"name":"PathTaperX","type":"S8","size":1},{"name":"PathTaperY","type":"S8","size":1},{"name":"PathRevolutions","type":"U8","size":1},{"name":"PathSkew","type":"S8","size":1},{"name":"ProfileBegin","type":"U16","size":1},{"name":"ProfileEnd","type":"U16","size":1},{"name":"ProfileHollow","type":"U16","size":1}]}]},{"name":"ObjectExtraParams","frequency":"Low","id":"99","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"ObjectData","type":"Variable","count":1,"params":[{"name":"ObjectLocalID","type":"U32","size":1},{"name":"ParamType","type":"U16","size":1},{"name":"ParamInUse","type":"BOOL","size":1},{"name":"ParamSize","type":"U32","size":1},{"name":"ParamData","type":"Variable","size":"1"}]}]},{"name":"ObjectOwner","frequency":"Low","id":"100","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"HeaderData","type":"Single","count":1,"params":[{"name":"Override","type":"BOOL","size":1},{"name":"OwnerID","type":"LLUUID","size":1},{"name":"GroupID","type":"LLUUID","size":1}]},{"name":"ObjectData","type":"Variable","count":1,"params":[{"name":"ObjectLocalID","type":"U32","size":1}]}]},{"name":"ObjectGroup","frequency":"Low","id":"101","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"GroupID","type":"LLUUID","size":1}]},{"name":"ObjectData","type":"Variable","count":1,"params":[{"name":"ObjectLocalID","type":"U32","size":1}]}]},{"name":"ObjectBuy","frequency":"Low","id":"102","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"GroupID","type":"LLUUID","size":1},{"name":"CategoryID","type":"LLUUID","size":1}]},{"name":"ObjectData","type":"Variable","count":1,"params":[{"name":"ObjectLocalID","type":"U32","size":1},{"name":"SaleType","type":"U8","size":1},{"name":"SalePrice","type":"S32","size":1}]}]},{"name":"BuyObjectInventory","frequency":"Low","id":"103","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"Data","type":"Single","count":1,"params":[{"name":"ObjectID","type":"LLUUID","size":1},{"name":"ItemID","type":"LLUUID","size":1},{"name":"FolderID","type":"LLUUID","size":1}]}]},{"name":"DerezContainer","frequency":"Low","id":"104","flags":["Trusted","Zerocoded"],"blocks":[{"name":"Data","type":"Single","count":1,"params":[{"name":"ObjectID","type":"LLUUID","size":1},{"name":"Delete","type":"BOOL","size":1}]}]},{"name":"ObjectPermissions","frequency":"Low","id":"105","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"HeaderData","type":"Single","count":1,"params":[{"name":"Override","type":"BOOL","size":1}]},{"name":"ObjectData","type":"Variable","count":1,"params":[{"name":"ObjectLocalID","type":"U32","size":1},{"name":"Field","type":"U8","size":1},{"name":"Set","type":"U8","size":1},{"name":"Mask","type":"U32","size":1}]}]},{"name":"ObjectSaleInfo","frequency":"Low","id":"106","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"ObjectData","type":"Variable","count":1,"params":[{"name":"LocalID","type":"U32","size":1},{"name":"SaleType","type":"U8","size":1},{"name":"SalePrice","type":"S32","size":1}]}]},{"name":"ObjectName","frequency":"Low","id":"107","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"ObjectData","type":"Variable","count":1,"params":[{"name":"LocalID","type":"U32","size":1},{"name":"Name","type":"Variable","size":"1"}]}]},{"name":"ObjectDescription","frequency":"Low","id":"108","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"ObjectData","type":"Variable","count":1,"params":[{"name":"LocalID","type":"U32","size":1},{"name":"Description","type":"Variable","size":"1"}]}]},{"name":"ObjectCategory","frequency":"Low","id":"109","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"ObjectData","type":"Variable","count":1,"params":[{"name":"LocalID","type":"U32","size":1},{"name":"Category","type":"U32","size":1}]}]},{"name":"ObjectSelect","frequency":"Low","id":"110","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"ObjectData","type":"Variable","count":1,"params":[{"name":"ObjectLocalID","type":"U32","size":1}]}]},{"name":"ObjectDeselect","frequency":"Low","id":"111","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"ObjectData","type":"Variable","count":1,"params":[{"name":"ObjectLocalID","type":"U32","size":1}]}]},{"name":"ObjectAttach","frequency":"Low","id":"112","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"AttachmentPoint","type":"U8","size":1}]},{"name":"ObjectData","type":"Variable","count":1,"params":[{"name":"ObjectLocalID","type":"U32","size":1},{"name":"Rotation","type":"LLQuaternion","size":1}]}]},{"name":"ObjectDetach","frequency":"Low","id":"113","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"ObjectData","type":"Variable","count":1,"params":[{"name":"ObjectLocalID","type":"U32","size":1}]}]},{"name":"ObjectDrop","frequency":"Low","id":"114","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"ObjectData","type":"Variable","count":1,"params":[{"name":"ObjectLocalID","type":"U32","size":1}]}]},{"name":"ObjectLink","frequency":"Low","id":"115","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"ObjectData","type":"Variable","count":1,"params":[{"name":"ObjectLocalID","type":"U32","size":1}]}]},{"name":"ObjectDelink","frequency":"Low","id":"116","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"ObjectData","type":"Variable","count":1,"params":[{"name":"ObjectLocalID","type":"U32","size":1}]}]},{"name":"ObjectGrab","frequency":"Low","id":"117","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"ObjectData","type":"Single","count":1,"params":[{"name":"LocalID","type":"U32","size":1},{"name":"GrabOffset","type":"LLVector3","size":1}]},{"name":"SurfaceInfo","type":"Variable","count":1,"params":[{"name":"UVCoord","type":"LLVector3","size":1},{"name":"STCoord","type":"LLVector3","size":1},{"name":"FaceIndex","type":"S32","size":1},{"name":"Position","type":"LLVector3","size":1},{"name":"Normal","type":"LLVector3","size":1},{"name":"Binormal","type":"LLVector3","size":1}]}]},{"name":"ObjectGrabUpdate","frequency":"Low","id":"118","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"ObjectData","type":"Single","count":1,"params":[{"name":"ObjectID","type":"LLUUID","size":1},{"name":"GrabOffsetInitial","type":"LLVector3","size":1},{"name":"GrabPosition","type":"LLVector3","size":1},{"name":"TimeSinceLast","type":"U32","size":1}]},{"name":"SurfaceInfo","type":"Variable","count":1,"params":[{"name":"UVCoord","type":"LLVector3","size":1},{"name":"STCoord","type":"LLVector3","size":1},{"name":"FaceIndex","type":"S32","size":1},{"name":"Position","type":"LLVector3","size":1},{"name":"Normal","type":"LLVector3","size":1},{"name":"Binormal","type":"LLVector3","size":1}]}]},{"name":"ObjectDeGrab","frequency":"Low","id":"119","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"ObjectData","type":"Single","count":1,"params":[{"name":"LocalID","type":"U32","size":1}]},{"name":"SurfaceInfo","type":"Variable","count":1,"params":[{"name":"UVCoord","type":"LLVector3","size":1},{"name":"STCoord","type":"LLVector3","size":1},{"name":"FaceIndex","type":"S32","size":1},{"name":"Position","type":"LLVector3","size":1},{"name":"Normal","type":"LLVector3","size":1},{"name":"Binormal","type":"LLVector3","size":1}]}]},{"name":"ObjectSpinStart","frequency":"Low","id":"120","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"ObjectData","type":"Single","count":1,"params":[{"name":"ObjectID","type":"LLUUID","size":1}]}]},{"name":"ObjectSpinUpdate","frequency":"Low","id":"121","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"ObjectData","type":"Single","count":1,"params":[{"name":"ObjectID","type":"LLUUID","size":1},{"name":"Rotation","type":"LLQuaternion","size":1}]}]},{"name":"ObjectSpinStop","frequency":"Low","id":"122","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"ObjectData","type":"Single","count":1,"params":[{"name":"ObjectID","type":"LLUUID","size":1}]}]},{"name":"ObjectExportSelected","frequency":"Low","id":"123","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"RequestID","type":"LLUUID","size":1},{"name":"VolumeDetail","type":"S16","size":1}]},{"name":"ObjectData","type":"Variable","count":1,"params":[{"name":"ObjectID","type":"LLUUID","size":1}]}]},{"name":"ModifyLand","frequency":"Low","id":"124","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"ModifyBlock","type":"Single","count":1,"params":[{"name":"Action","type":"U8","size":1},{"name":"BrushSize","type":"U8","size":1},{"name":"Seconds","type":"F32","size":1},{"name":"Height","type":"F32","size":1}]},{"name":"ParcelData","type":"Variable","count":1,"params":[{"name":"LocalID","type":"S32","size":1},{"name":"West","type":"F32","size":1},{"name":"South","type":"F32","size":1},{"name":"East","type":"F32","size":1},{"name":"North","type":"F32","size":1}]},{"name":"ModifyBlockExtended","type":"Variable","count":1,"params":[{"name":"BrushSize","type":"F32","size":1}]}]},{"name":"VelocityInterpolateOn","frequency":"Low","id":"125","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]}]},{"name":"VelocityInterpolateOff","frequency":"Low","id":"126","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]}]},{"name":"StateSave","frequency":"Low","id":"127","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"DataBlock","type":"Single","count":1,"params":[{"name":"Filename","type":"Variable","size":"1"}]}]},{"name":"ReportAutosaveCrash","frequency":"Low","id":"128","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AutosaveData","type":"Single","count":1,"params":[{"name":"PID","type":"S32","size":1},{"name":"Status","type":"S32","size":1}]}]},{"name":"SimWideDeletes","frequency":"Low","id":"129","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"DataBlock","type":"Single","count":1,"params":[{"name":"TargetID","type":"LLUUID","size":1},{"name":"Flags","type":"U32","size":1}]}]},{"name":"RequestObjectPropertiesFamily","frequency":"Medium","id":"5","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"ObjectData","type":"Single","count":1,"params":[{"name":"RequestFlags","type":"U32","size":1},{"name":"ObjectID","type":"LLUUID","size":1}]}]},{"name":"TrackAgent","frequency":"Low","id":"130","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"TargetData","type":"Single","count":1,"params":[{"name":"PreyID","type":"LLUUID","size":1}]}]},{"name":"ViewerStats","frequency":"Low","id":"131","flags":["NotTrusted","Zerocoded","UDPDeprecated"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"IP","type":"IPADDR","size":1},{"name":"StartTime","type":"U32","size":1},{"name":"RunTime","type":"F32","size":1},{"name":"SimFPS","type":"F32","size":1},{"name":"FPS","type":"F32","size":1},{"name":"AgentsInView","type":"U8","size":1},{"name":"Ping","type":"F32","size":1},{"name":"MetersTraveled","type":"F64","size":1},{"name":"RegionsVisited","type":"S32","size":1},{"name":"SysRAM","type":"U32","size":1},{"name":"SysOS","type":"Variable","size":"1"},{"name":"SysCPU","type":"Variable","size":"1"},{"name":"SysGPU","type":"Variable","size":"1"}]},{"name":"DownloadTotals","type":"Single","count":1,"params":[{"name":"World","type":"U32","size":1},{"name":"Objects","type":"U32","size":1},{"name":"Textures","type":"U32","size":1}]},{"name":"NetStats","type":"Multiple","count":"2","params":[{"name":"Bytes","type":"U32","size":1},{"name":"Packets","type":"U32","size":1},{"name":"Compressed","type":"U32","size":1},{"name":"Savings","type":"U32","size":1}]},{"name":"FailStats","type":"Single","count":1,"params":[{"name":"SendPacket","type":"U32","size":1},{"name":"Dropped","type":"U32","size":1},{"name":"Resent","type":"U32","size":1},{"name":"FailedResends","type":"U32","size":1},{"name":"OffCircuit","type":"U32","size":1},{"name":"Invalid","type":"U32","size":1}]},{"name":"MiscStats","type":"Variable","count":1,"params":[{"name":"Type","type":"U32","size":1},{"name":"Value","type":"F64","size":1}]}]},{"name":"ScriptAnswerYes","frequency":"Low","id":"132","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"Data","type":"Single","count":1,"params":[{"name":"TaskID","type":"LLUUID","size":1},{"name":"ItemID","type":"LLUUID","size":1},{"name":"Questions","type":"S32","size":1}]}]},{"name":"UserReport","frequency":"Low","id":"133","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"ReportData","type":"Single","count":1,"params":[{"name":"ReportType","type":"U8","size":1},{"name":"Category","type":"U8","size":1},{"name":"Position","type":"LLVector3","size":1},{"name":"CheckFlags","type":"U8","size":1},{"name":"ScreenshotID","type":"LLUUID","size":1},{"name":"ObjectID","type":"LLUUID","size":1},{"name":"AbuserID","type":"LLUUID","size":1},{"name":"AbuseRegionName","type":"Variable","size":"1"},{"name":"AbuseRegionID","type":"LLUUID","size":1},{"name":"Summary","type":"Variable","size":"1"},{"name":"Details","type":"Variable","size":"2"},{"name":"VersionString","type":"Variable","size":"1"}]}]},{"name":"AlertMessage","frequency":"Low","id":"134","flags":["Trusted","Unencoded"],"blocks":[{"name":"AlertData","type":"Single","count":1,"params":[{"name":"Message","type":"Variable","size":"1"}]},{"name":"AlertInfo","type":"Variable","count":1,"params":[{"name":"Message","type":"Variable","size":"1"},{"name":"ExtraParams","type":"Variable","size":"1"}]},{"name":"AgentInfo","type":"Variable","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1}]}]},{"name":"AgentAlertMessage","frequency":"Low","id":"135","flags":["Trusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1}]},{"name":"AlertData","type":"Single","count":1,"params":[{"name":"Modal","type":"BOOL","size":1},{"name":"Message","type":"Variable","size":"1"}]}]},{"name":"MeanCollisionAlert","frequency":"Low","id":"136","flags":["Trusted","Zerocoded"],"blocks":[{"name":"MeanCollision","type":"Variable","count":1,"params":[{"name":"Victim","type":"LLUUID","size":1},{"name":"Perp","type":"LLUUID","size":1},{"name":"Time","type":"U32","size":1},{"name":"Mag","type":"F32","size":1},{"name":"Type","type":"U8","size":1}]}]},{"name":"ViewerFrozenMessage","frequency":"Low","id":"137","flags":["Trusted","Unencoded"],"blocks":[{"name":"FrozenData","type":"Single","count":1,"params":[{"name":"Data","type":"BOOL","size":1}]}]},{"name":"HealthMessage","frequency":"Low","id":"138","flags":["Trusted","Zerocoded"],"blocks":[{"name":"HealthData","type":"Single","count":1,"params":[{"name":"Health","type":"F32","size":1}]}]},{"name":"ChatFromSimulator","frequency":"Low","id":"139","flags":["Trusted","Unencoded"],"blocks":[{"name":"ChatData","type":"Single","count":1,"params":[{"name":"FromName","type":"Variable","size":"1"},{"name":"SourceID","type":"LLUUID","size":1},{"name":"OwnerID","type":"LLUUID","size":1},{"name":"SourceType","type":"U8","size":1},{"name":"ChatType","type":"U8","size":1},{"name":"Audible","type":"U8","size":1},{"name":"Position","type":"LLVector3","size":1},{"name":"Message","type":"Variable","size":"2"}]}]},{"name":"SimStats","frequency":"Low","id":"140","flags":["Trusted","Unencoded"],"blocks":[{"name":"Region","type":"Single","count":1,"params":[{"name":"RegionX","type":"U32","size":1},{"name":"RegionY","type":"U32","size":1},{"name":"RegionFlags","type":"U32","size":1},{"name":"ObjectCapacity","type":"U32","size":1}]},{"name":"Stat","type":"Variable","count":1,"params":[{"name":"StatID","type":"U32","size":1},{"name":"StatValue","type":"F32","size":1}]},{"name":"PidStat","type":"Single","count":1,"params":[{"name":"PID","type":"S32","size":1}]},{"name":"RegionInfo","type":"Variable","count":1,"params":[{"name":"RegionFlagsExtended","type":"U64","size":1}]}]},{"name":"RequestRegionInfo","frequency":"Low","id":"141","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]}]},{"name":"RegionInfo","frequency":"Low","id":"142","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"RegionInfo","type":"Single","count":1,"params":[{"name":"SimName","type":"Variable","size":"1"},{"name":"EstateID","type":"U32","size":1},{"name":"ParentEstateID","type":"U32","size":1},{"name":"RegionFlags","type":"U32","size":1},{"name":"SimAccess","type":"U8","size":1},{"name":"MaxAgents","type":"U8","size":1},{"name":"BillableFactor","type":"F32","size":1},{"name":"ObjectBonusFactor","type":"F32","size":1},{"name":"WaterHeight","type":"F32","size":1},{"name":"TerrainRaiseLimit","type":"F32","size":1},{"name":"TerrainLowerLimit","type":"F32","size":1},{"name":"PricePerMeter","type":"S32","size":1},{"name":"RedirectGridX","type":"S32","size":1},{"name":"RedirectGridY","type":"S32","size":1},{"name":"UseEstateSun","type":"BOOL","size":1},{"name":"SunHour","type":"F32","size":1}]},{"name":"RegionInfo2","type":"Single","count":1,"params":[{"name":"ProductSKU","type":"Variable","size":"1"},{"name":"ProductName","type":"Variable","size":"1"},{"name":"MaxAgents32","type":"U32","size":1},{"name":"HardMaxAgents","type":"U32","size":1},{"name":"HardMaxObjects","type":"U32","size":1}]},{"name":"RegionInfo3","type":"Variable","count":1,"params":[{"name":"RegionFlagsExtended","type":"U64","size":1}]}]},{"name":"GodUpdateRegionInfo","frequency":"Low","id":"143","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"RegionInfo","type":"Single","count":1,"params":[{"name":"SimName","type":"Variable","size":"1"},{"name":"EstateID","type":"U32","size":1},{"name":"ParentEstateID","type":"U32","size":1},{"name":"RegionFlags","type":"U32","size":1},{"name":"BillableFactor","type":"F32","size":1},{"name":"PricePerMeter","type":"S32","size":1},{"name":"RedirectGridX","type":"S32","size":1},{"name":"RedirectGridY","type":"S32","size":1}]},{"name":"RegionInfo2","type":"Variable","count":1,"params":[{"name":"RegionFlagsExtended","type":"U64","size":1}]}]},{"name":"NearestLandingRegionRequest","frequency":"Low","id":"144","flags":["Trusted","Unencoded"],"blocks":[{"name":"RequestingRegionData","type":"Single","count":1,"params":[{"name":"RegionHandle","type":"U64","size":1}]}]},{"name":"NearestLandingRegionReply","frequency":"Low","id":"145","flags":["Trusted","Unencoded"],"blocks":[{"name":"LandingRegionData","type":"Single","count":1,"params":[{"name":"RegionHandle","type":"U64","size":1}]}]},{"name":"NearestLandingRegionUpdated","frequency":"Low","id":"146","flags":["Trusted","Unencoded"],"blocks":[{"name":"RegionData","type":"Single","count":1,"params":[{"name":"RegionHandle","type":"U64","size":1}]}]},{"name":"TeleportLandingStatusChanged","frequency":"Low","id":"147","flags":["Trusted","Unencoded"],"blocks":[{"name":"RegionData","type":"Single","count":1,"params":[{"name":"RegionHandle","type":"U64","size":1}]}]},{"name":"RegionHandshake","frequency":"Low","id":"148","flags":["Trusted","Zerocoded"],"blocks":[{"name":"RegionInfo","type":"Single","count":1,"params":[{"name":"RegionFlags","type":"U32","size":1},{"name":"SimAccess","type":"U8","size":1},{"name":"SimName","type":"Variable","size":"1"},{"name":"SimOwner","type":"LLUUID","size":1},{"name":"IsEstateManager","type":"BOOL","size":1},{"name":"WaterHeight","type":"F32","size":1},{"name":"BillableFactor","type":"F32","size":1},{"name":"CacheID","type":"LLUUID","size":1},{"name":"TerrainBase0","type":"LLUUID","size":1},{"name":"TerrainBase1","type":"LLUUID","size":1},{"name":"TerrainBase2","type":"LLUUID","size":1},{"name":"TerrainBase3","type":"LLUUID","size":1},{"name":"TerrainDetail0","type":"LLUUID","size":1},{"name":"TerrainDetail1","type":"LLUUID","size":1},{"name":"TerrainDetail2","type":"LLUUID","size":1},{"name":"TerrainDetail3","type":"LLUUID","size":1},{"name":"TerrainStartHeight00","type":"F32","size":1},{"name":"TerrainStartHeight01","type":"F32","size":1},{"name":"TerrainStartHeight10","type":"F32","size":1},{"name":"TerrainStartHeight11","type":"F32","size":1},{"name":"TerrainHeightRange00","type":"F32","size":1},{"name":"TerrainHeightRange01","type":"F32","size":1},{"name":"TerrainHeightRange10","type":"F32","size":1},{"name":"TerrainHeightRange11","type":"F32","size":1}]},{"name":"RegionInfo2","type":"Single","count":1,"params":[{"name":"RegionID","type":"LLUUID","size":1}]},{"name":"RegionInfo3","type":"Single","count":1,"params":[{"name":"CPUClassID","type":"S32","size":1},{"name":"CPURatio","type":"S32","size":1},{"name":"ColoName","type":"Variable","size":"1"},{"name":"ProductSKU","type":"Variable","size":"1"},{"name":"ProductName","type":"Variable","size":"1"}]},{"name":"RegionInfo4","type":"Variable","count":1,"params":[{"name":"RegionFlagsExtended","type":"U64","size":1},{"name":"RegionProtocols","type":"U64","size":1}]}]},{"name":"RegionHandshakeReply","frequency":"Low","id":"149","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"RegionInfo","type":"Single","count":1,"params":[{"name":"Flags","type":"U32","size":1}]}]},{"name":"CoarseLocationUpdate","frequency":"Medium","id":"6","flags":["Trusted","Unencoded"],"blocks":[{"name":"Location","type":"Variable","count":1,"params":[{"name":"X","type":"U8","size":1},{"name":"Y","type":"U8","size":1},{"name":"Z","type":"U8","size":1}]},{"name":"Index","type":"Single","count":1,"params":[{"name":"You","type":"S16","size":1},{"name":"Prey","type":"S16","size":1}]},{"name":"AgentData","type":"Variable","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1}]}]},{"name":"ImageData","frequency":"High","id":"9","flags":["Trusted","Unencoded"],"blocks":[{"name":"ImageID","type":"Single","count":1,"params":[{"name":"ID","type":"LLUUID","size":1},{"name":"Codec","type":"U8","size":1},{"name":"Size","type":"U32","size":1},{"name":"Packets","type":"U16","size":1}]},{"name":"ImageData","type":"Single","count":1,"params":[{"name":"Data","type":"Variable","size":"2"}]}]},{"name":"ImagePacket","frequency":"High","id":"10","flags":["Trusted","Unencoded"],"blocks":[{"name":"ImageID","type":"Single","count":1,"params":[{"name":"ID","type":"LLUUID","size":1},{"name":"Packet","type":"U16","size":1}]},{"name":"ImageData","type":"Single","count":1,"params":[{"name":"Data","type":"Variable","size":"2"}]}]},{"name":"LayerData","frequency":"High","id":"11","flags":["Trusted","Unencoded"],"blocks":[{"name":"LayerID","type":"Single","count":1,"params":[{"name":"Type","type":"U8","size":1}]},{"name":"LayerData","type":"Single","count":1,"params":[{"name":"Data","type":"Variable","size":"2"}]}]},{"name":"ObjectUpdate","frequency":"High","id":"12","flags":["Trusted","Zerocoded"],"blocks":[{"name":"RegionData","type":"Single","count":1,"params":[{"name":"RegionHandle","type":"U64","size":1},{"name":"TimeDilation","type":"U16","size":1}]},{"name":"ObjectData","type":"Variable","count":1,"params":[{"name":"ID","type":"U32","size":1},{"name":"State","type":"U8","size":1},{"name":"FullID","type":"LLUUID","size":1},{"name":"CRC","type":"U32","size":1},{"name":"PCode","type":"U8","size":1},{"name":"Material","type":"U8","size":1},{"name":"ClickAction","type":"U8","size":1},{"name":"Scale","type":"LLVector3","size":1},{"name":"ObjectData","type":"Variable","size":"1"},{"name":"ParentID","type":"U32","size":1},{"name":"UpdateFlags","type":"U32","size":1},{"name":"PathCurve","type":"U8","size":1},{"name":"ProfileCurve","type":"U8","size":1},{"name":"PathBegin","type":"U16","size":1},{"name":"PathEnd","type":"U16","size":1},{"name":"PathScaleX","type":"U8","size":1},{"name":"PathScaleY","type":"U8","size":1},{"name":"PathShearX","type":"U8","size":1},{"name":"PathShearY","type":"U8","size":1},{"name":"PathTwist","type":"S8","size":1},{"name":"PathTwistBegin","type":"S8","size":1},{"name":"PathRadiusOffset","type":"S8","size":1},{"name":"PathTaperX","type":"S8","size":1},{"name":"PathTaperY","type":"S8","size":1},{"name":"PathRevolutions","type":"U8","size":1},{"name":"PathSkew","type":"S8","size":1},{"name":"ProfileBegin","type":"U16","size":1},{"name":"ProfileEnd","type":"U16","size":1},{"name":"ProfileHollow","type":"U16","size":1},{"name":"TextureEntry","type":"Variable","size":"2"},{"name":"TextureAnim","type":"Variable","size":"1"},{"name":"NameValue","type":"Variable","size":"2"},{"name":"Data","type":"Variable","size":"2"},{"name":"Text","type":"Variable","size":"1"},{"name":"TextColor","type":"Fixed","size":"4"},{"name":"MediaURL","type":"Variable","size":"1"},{"name":"PSBlock","type":"Variable","size":"1"},{"name":"ExtraParams","type":"Variable","size":"1"},{"name":"Sound","type":"LLUUID","size":1},{"name":"OwnerID","type":"LLUUID","size":1},{"name":"Gain","type":"F32","size":1},{"name":"Flags","type":"U8","size":1},{"name":"Radius","type":"F32","size":1},{"name":"JointType","type":"U8","size":1},{"name":"JointPivot","type":"LLVector3","size":1},{"name":"JointAxisOrAnchor","type":"LLVector3","size":1}]}]},{"name":"ObjectUpdateCompressed","frequency":"High","id":"13","flags":["Trusted","Unencoded"],"blocks":[{"name":"RegionData","type":"Single","count":1,"params":[{"name":"RegionHandle","type":"U64","size":1},{"name":"TimeDilation","type":"U16","size":1}]},{"name":"ObjectData","type":"Variable","count":1,"params":[{"name":"UpdateFlags","type":"U32","size":1},{"name":"Data","type":"Variable","size":"2"}]}]},{"name":"ObjectUpdateCached","frequency":"High","id":"14","flags":["Trusted","Unencoded"],"blocks":[{"name":"RegionData","type":"Single","count":1,"params":[{"name":"RegionHandle","type":"U64","size":1},{"name":"TimeDilation","type":"U16","size":1}]},{"name":"ObjectData","type":"Variable","count":1,"params":[{"name":"ID","type":"U32","size":1},{"name":"CRC","type":"U32","size":1},{"name":"UpdateFlags","type":"U32","size":1}]}]},{"name":"ImprovedTerseObjectUpdate","frequency":"High","id":"15","flags":["Trusted","Unencoded"],"blocks":[{"name":"RegionData","type":"Single","count":1,"params":[{"name":"RegionHandle","type":"U64","size":1},{"name":"TimeDilation","type":"U16","size":1}]},{"name":"ObjectData","type":"Variable","count":1,"params":[{"name":"Data","type":"Variable","size":"1"},{"name":"TextureEntry","type":"Variable","size":"2"}]}]},{"name":"KillObject","frequency":"High","id":"16","flags":["Trusted","Unencoded"],"blocks":[{"name":"ObjectData","type":"Variable","count":1,"params":[{"name":"ID","type":"U32","size":1}]}]},{"name":"CrossedRegion","frequency":"Medium","id":"7","flags":["Trusted","Unencoded","UDPBlackListed"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"RegionData","type":"Single","count":1,"params":[{"name":"SimIP","type":"IPADDR","size":1},{"name":"SimPort","type":"IPPORT","size":1},{"name":"RegionHandle","type":"U64","size":1},{"name":"SeedCapability","type":"Variable","size":"2"}]},{"name":"Info","type":"Single","count":1,"params":[{"name":"Position","type":"LLVector3","size":1},{"name":"LookAt","type":"LLVector3","size":1}]}]},{"name":"SimulatorViewerTimeMessage","frequency":"Low","id":"150","flags":["Trusted","Unencoded"],"blocks":[{"name":"TimeInfo","type":"Single","count":1,"params":[{"name":"UsecSinceStart","type":"U64","size":1},{"name":"SecPerDay","type":"U32","size":1},{"name":"SecPerYear","type":"U32","size":1},{"name":"SunDirection","type":"LLVector3","size":1},{"name":"SunPhase","type":"F32","size":1},{"name":"SunAngVelocity","type":"LLVector3","size":1}]}]},{"name":"EnableSimulator","frequency":"Low","id":"151","flags":["Trusted","Unencoded","UDPBlackListed"],"blocks":[{"name":"SimulatorInfo","type":"Single","count":1,"params":[{"name":"Handle","type":"U64","size":1},{"name":"IP","type":"IPADDR","size":1},{"name":"Port","type":"IPPORT","size":1}]}]},{"name":"DisableSimulator","frequency":"Low","id":"152","flags":["Trusted","Unencoded"],"blocks":[]},{"name":"ConfirmEnableSimulator","frequency":"Medium","id":"8","flags":["Trusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]}]},{"name":"TransferRequest","frequency":"Low","id":"153","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"TransferInfo","type":"Single","count":1,"params":[{"name":"TransferID","type":"LLUUID","size":1},{"name":"ChannelType","type":"S32","size":1},{"name":"SourceType","type":"S32","size":1},{"name":"Priority","type":"F32","size":1},{"name":"Params","type":"Variable","size":"2"}]}]},{"name":"TransferInfo","frequency":"Low","id":"154","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"TransferInfo","type":"Single","count":1,"params":[{"name":"TransferID","type":"LLUUID","size":1},{"name":"ChannelType","type":"S32","size":1},{"name":"TargetType","type":"S32","size":1},{"name":"Status","type":"S32","size":1},{"name":"Size","type":"S32","size":1},{"name":"Params","type":"Variable","size":"2"}]}]},{"name":"TransferPacket","frequency":"High","id":"17","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"TransferData","type":"Single","count":1,"params":[{"name":"TransferID","type":"LLUUID","size":1},{"name":"ChannelType","type":"S32","size":1},{"name":"Packet","type":"S32","size":1},{"name":"Status","type":"S32","size":1},{"name":"Data","type":"Variable","size":"2"}]}]},{"name":"TransferAbort","frequency":"Low","id":"155","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"TransferInfo","type":"Single","count":1,"params":[{"name":"TransferID","type":"LLUUID","size":1},{"name":"ChannelType","type":"S32","size":1}]}]},{"name":"RequestXfer","frequency":"Low","id":"156","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"XferID","type":"Single","count":1,"params":[{"name":"ID","type":"U64","size":1},{"name":"Filename","type":"Variable","size":"1"},{"name":"FilePath","type":"U8","size":1},{"name":"DeleteOnCompletion","type":"BOOL","size":1},{"name":"UseBigPackets","type":"BOOL","size":1},{"name":"VFileID","type":"LLUUID","size":1},{"name":"VFileType","type":"S16","size":1}]}]},{"name":"SendXferPacket","frequency":"High","id":"18","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"XferID","type":"Single","count":1,"params":[{"name":"ID","type":"U64","size":1},{"name":"Packet","type":"U32","size":1}]},{"name":"DataPacket","type":"Single","count":1,"params":[{"name":"Data","type":"Variable","size":"2"}]}]},{"name":"ConfirmXferPacket","frequency":"High","id":"19","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"XferID","type":"Single","count":1,"params":[{"name":"ID","type":"U64","size":1},{"name":"Packet","type":"U32","size":1}]}]},{"name":"AbortXfer","frequency":"Low","id":"157","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"XferID","type":"Single","count":1,"params":[{"name":"ID","type":"U64","size":1},{"name":"Result","type":"S32","size":1}]}]},{"name":"AvatarAnimation","frequency":"High","id":"20","flags":["Trusted","Unencoded"],"blocks":[{"name":"Sender","type":"Single","count":1,"params":[{"name":"ID","type":"LLUUID","size":1}]},{"name":"AnimationList","type":"Variable","count":1,"params":[{"name":"AnimID","type":"LLUUID","size":1},{"name":"AnimSequenceID","type":"S32","size":1}]},{"name":"AnimationSourceList","type":"Variable","count":1,"params":[{"name":"ObjectID","type":"LLUUID","size":1}]},{"name":"PhysicalAvatarEventList","type":"Variable","count":1,"params":[{"name":"TypeData","type":"Variable","size":"1"}]}]},{"name":"AvatarAppearance","frequency":"Low","id":"158","flags":["Trusted","Zerocoded"],"blocks":[{"name":"Sender","type":"Single","count":1,"params":[{"name":"ID","type":"LLUUID","size":1},{"name":"IsTrial","type":"BOOL","size":1}]},{"name":"ObjectData","type":"Single","count":1,"params":[{"name":"TextureEntry","type":"Variable","size":"2"}]},{"name":"VisualParam","type":"Variable","count":1,"params":[{"name":"ParamValue","type":"U8","size":1}]},{"name":"AppearanceData","type":"Variable","count":1,"params":[{"name":"AppearanceVersion","type":"U8","size":1},{"name":"CofVersion","type":"S32","size":1},{"name":"Flags","type":"U32","size":1}]},{"name":"AppearanceHover","type":"Variable","count":1,"params":[{"name":"HoverHeight","type":"LLVector3","size":1}]}]},{"name":"AvatarSitResponse","frequency":"High","id":"21","flags":["Trusted","Zerocoded"],"blocks":[{"name":"SitObject","type":"Single","count":1,"params":[{"name":"ID","type":"LLUUID","size":1}]},{"name":"SitTransform","type":"Single","count":1,"params":[{"name":"AutoPilot","type":"BOOL","size":1},{"name":"SitPosition","type":"LLVector3","size":1},{"name":"SitRotation","type":"LLQuaternion","size":1},{"name":"CameraEyeOffset","type":"LLVector3","size":1},{"name":"CameraAtOffset","type":"LLVector3","size":1},{"name":"ForceMouselook","type":"BOOL","size":1}]}]},{"name":"SetFollowCamProperties","frequency":"Low","id":"159","flags":["Trusted","Unencoded"],"blocks":[{"name":"ObjectData","type":"Single","count":1,"params":[{"name":"ObjectID","type":"LLUUID","size":1}]},{"name":"CameraProperty","type":"Variable","count":1,"params":[{"name":"Type","type":"S32","size":1},{"name":"Value","type":"F32","size":1}]}]},{"name":"ClearFollowCamProperties","frequency":"Low","id":"160","flags":["Trusted","Unencoded"],"blocks":[{"name":"ObjectData","type":"Single","count":1,"params":[{"name":"ObjectID","type":"LLUUID","size":1}]}]},{"name":"CameraConstraint","frequency":"High","id":"22","flags":["Trusted","Zerocoded"],"blocks":[{"name":"CameraCollidePlane","type":"Single","count":1,"params":[{"name":"Plane","type":"LLVector4","size":1}]}]},{"name":"ObjectProperties","frequency":"Medium","id":"9","flags":["Trusted","Zerocoded"],"blocks":[{"name":"ObjectData","type":"Variable","count":1,"params":[{"name":"ObjectID","type":"LLUUID","size":1},{"name":"CreatorID","type":"LLUUID","size":1},{"name":"OwnerID","type":"LLUUID","size":1},{"name":"GroupID","type":"LLUUID","size":1},{"name":"CreationDate","type":"U64","size":1},{"name":"BaseMask","type":"U32","size":1},{"name":"OwnerMask","type":"U32","size":1},{"name":"GroupMask","type":"U32","size":1},{"name":"EveryoneMask","type":"U32","size":1},{"name":"NextOwnerMask","type":"U32","size":1},{"name":"OwnershipCost","type":"S32","size":1},{"name":"TaxRate","type":"F32","size":1},{"name":"SaleType","type":"U8","size":1},{"name":"SalePrice","type":"S32","size":1},{"name":"AggregatePerms","type":"U8","size":1},{"name":"AggregatePermTextures","type":"U8","size":1},{"name":"AggregatePermTexturesOwner","type":"U8","size":1},{"name":"Category","type":"U32","size":1},{"name":"InventorySerial","type":"S16","size":1},{"name":"ItemID","type":"LLUUID","size":1},{"name":"FolderID","type":"LLUUID","size":1},{"name":"FromTaskID","type":"LLUUID","size":1},{"name":"LastOwnerID","type":"LLUUID","size":1},{"name":"Name","type":"Variable","size":"1"},{"name":"Description","type":"Variable","size":"1"},{"name":"TouchName","type":"Variable","size":"1"},{"name":"SitName","type":"Variable","size":"1"},{"name":"TextureID","type":"Variable","size":"1"}]}]},{"name":"ObjectPropertiesFamily","frequency":"Medium","id":"10","flags":["Trusted","Zerocoded"],"blocks":[{"name":"ObjectData","type":"Single","count":1,"params":[{"name":"RequestFlags","type":"U32","size":1},{"name":"ObjectID","type":"LLUUID","size":1},{"name":"OwnerID","type":"LLUUID","size":1},{"name":"GroupID","type":"LLUUID","size":1},{"name":"BaseMask","type":"U32","size":1},{"name":"OwnerMask","type":"U32","size":1},{"name":"GroupMask","type":"U32","size":1},{"name":"EveryoneMask","type":"U32","size":1},{"name":"NextOwnerMask","type":"U32","size":1},{"name":"OwnershipCost","type":"S32","size":1},{"name":"SaleType","type":"U8","size":1},{"name":"SalePrice","type":"S32","size":1},{"name":"Category","type":"U32","size":1},{"name":"LastOwnerID","type":"LLUUID","size":1},{"name":"Name","type":"Variable","size":"1"},{"name":"Description","type":"Variable","size":"1"}]}]},{"name":"RequestPayPrice","frequency":"Low","id":"161","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"ObjectData","type":"Single","count":1,"params":[{"name":"ObjectID","type":"LLUUID","size":1}]}]},{"name":"PayPriceReply","frequency":"Low","id":"162","flags":["Trusted","Unencoded"],"blocks":[{"name":"ObjectData","type":"Single","count":1,"params":[{"name":"ObjectID","type":"LLUUID","size":1},{"name":"DefaultPayPrice","type":"S32","size":1}]},{"name":"ButtonData","type":"Variable","count":1,"params":[{"name":"PayButton","type":"S32","size":1}]}]},{"name":"KickUser","frequency":"Low","id":"163","flags":["Trusted","Unencoded"],"blocks":[{"name":"TargetBlock","type":"Single","count":1,"params":[{"name":"TargetIP","type":"IPADDR","size":1},{"name":"TargetPort","type":"IPPORT","size":1}]},{"name":"UserInfo","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"Reason","type":"Variable","size":"2"}]}]},{"name":"KickUserAck","frequency":"Low","id":"164","flags":["Trusted","Unencoded"],"blocks":[{"name":"UserInfo","type":"Single","count":1,"params":[{"name":"SessionID","type":"LLUUID","size":1},{"name":"Flags","type":"U32","size":1}]}]},{"name":"GodKickUser","frequency":"Low","id":"165","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"UserInfo","type":"Single","count":1,"params":[{"name":"GodID","type":"LLUUID","size":1},{"name":"GodSessionID","type":"LLUUID","size":1},{"name":"AgentID","type":"LLUUID","size":1},{"name":"KickFlags","type":"U32","size":1},{"name":"Reason","type":"Variable","size":"2"}]}]},{"name":"SystemKickUser","frequency":"Low","id":"166","flags":["Trusted","Unencoded"],"blocks":[{"name":"AgentInfo","type":"Variable","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1}]}]},{"name":"EjectUser","frequency":"Low","id":"167","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"Data","type":"Single","count":1,"params":[{"name":"TargetID","type":"LLUUID","size":1},{"name":"Flags","type":"U32","size":1}]}]},{"name":"FreezeUser","frequency":"Low","id":"168","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"Data","type":"Single","count":1,"params":[{"name":"TargetID","type":"LLUUID","size":1},{"name":"Flags","type":"U32","size":1}]}]},{"name":"AvatarPropertiesRequest","frequency":"Low","id":"169","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"AvatarID","type":"LLUUID","size":1}]}]},{"name":"AvatarPropertiesRequestBackend","frequency":"Low","id":"170","flags":["Trusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"AvatarID","type":"LLUUID","size":1},{"name":"GodLevel","type":"U8","size":1},{"name":"WebProfilesDisabled","type":"BOOL","size":1}]}]},{"name":"AvatarPropertiesReply","frequency":"Low","id":"171","flags":["Trusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"AvatarID","type":"LLUUID","size":1}]},{"name":"PropertiesData","type":"Single","count":1,"params":[{"name":"ImageID","type":"LLUUID","size":1},{"name":"FLImageID","type":"LLUUID","size":1},{"name":"PartnerID","type":"LLUUID","size":1},{"name":"AboutText","type":"Variable","size":"2"},{"name":"FLAboutText","type":"Variable","size":"1"},{"name":"BornOn","type":"Variable","size":"1"},{"name":"ProfileURL","type":"Variable","size":"1"},{"name":"CharterMember","type":"Variable","size":"1"},{"name":"Flags","type":"U32","size":1}]}]},{"name":"AvatarInterestsReply","frequency":"Low","id":"172","flags":["Trusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"AvatarID","type":"LLUUID","size":1}]},{"name":"PropertiesData","type":"Single","count":1,"params":[{"name":"WantToMask","type":"U32","size":1},{"name":"WantToText","type":"Variable","size":"1"},{"name":"SkillsMask","type":"U32","size":1},{"name":"SkillsText","type":"Variable","size":"1"},{"name":"LanguagesText","type":"Variable","size":"1"}]}]},{"name":"AvatarGroupsReply","frequency":"Low","id":"173","flags":["Trusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"AvatarID","type":"LLUUID","size":1}]},{"name":"GroupData","type":"Variable","count":1,"params":[{"name":"GroupPowers","type":"U64","size":1},{"name":"AcceptNotices","type":"BOOL","size":1},{"name":"GroupTitle","type":"Variable","size":"1"},{"name":"GroupID","type":"LLUUID","size":1},{"name":"GroupName","type":"Variable","size":"1"},{"name":"GroupInsigniaID","type":"LLUUID","size":1}]},{"name":"NewGroupData","type":"Single","count":1,"params":[{"name":"ListInProfile","type":"BOOL","size":1}]}]},{"name":"AvatarPropertiesUpdate","frequency":"Low","id":"174","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"PropertiesData","type":"Single","count":1,"params":[{"name":"ImageID","type":"LLUUID","size":1},{"name":"FLImageID","type":"LLUUID","size":1},{"name":"AboutText","type":"Variable","size":"2"},{"name":"FLAboutText","type":"Variable","size":"1"},{"name":"AllowPublish","type":"BOOL","size":1},{"name":"MaturePublish","type":"BOOL","size":1},{"name":"ProfileURL","type":"Variable","size":"1"}]}]},{"name":"AvatarInterestsUpdate","frequency":"Low","id":"175","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"PropertiesData","type":"Single","count":1,"params":[{"name":"WantToMask","type":"U32","size":1},{"name":"WantToText","type":"Variable","size":"1"},{"name":"SkillsMask","type":"U32","size":1},{"name":"SkillsText","type":"Variable","size":"1"},{"name":"LanguagesText","type":"Variable","size":"1"}]}]},{"name":"AvatarNotesReply","frequency":"Low","id":"176","flags":["Trusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1}]},{"name":"Data","type":"Single","count":1,"params":[{"name":"TargetID","type":"LLUUID","size":1},{"name":"Notes","type":"Variable","size":"2"}]}]},{"name":"AvatarNotesUpdate","frequency":"Low","id":"177","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"Data","type":"Single","count":1,"params":[{"name":"TargetID","type":"LLUUID","size":1},{"name":"Notes","type":"Variable","size":"2"}]}]},{"name":"AvatarPicksReply","frequency":"Low","id":"178","flags":["Trusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"TargetID","type":"LLUUID","size":1}]},{"name":"Data","type":"Variable","count":1,"params":[{"name":"PickID","type":"LLUUID","size":1},{"name":"PickName","type":"Variable","size":"1"}]}]},{"name":"EventInfoRequest","frequency":"Low","id":"179","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"EventData","type":"Single","count":1,"params":[{"name":"EventID","type":"U32","size":1}]}]},{"name":"EventInfoReply","frequency":"Low","id":"180","flags":["Trusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1}]},{"name":"EventData","type":"Single","count":1,"params":[{"name":"EventID","type":"U32","size":1},{"name":"Creator","type":"Variable","size":"1"},{"name":"Name","type":"Variable","size":"1"},{"name":"Category","type":"Variable","size":"1"},{"name":"Desc","type":"Variable","size":"2"},{"name":"Date","type":"Variable","size":"1"},{"name":"DateUTC","type":"U32","size":1},{"name":"Duration","type":"U32","size":1},{"name":"Cover","type":"U32","size":1},{"name":"Amount","type":"U32","size":1},{"name":"SimName","type":"Variable","size":"1"},{"name":"GlobalPos","type":"LLVector3d","size":1},{"name":"EventFlags","type":"U32","size":1}]}]},{"name":"EventNotificationAddRequest","frequency":"Low","id":"181","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"EventData","type":"Single","count":1,"params":[{"name":"EventID","type":"U32","size":1}]}]},{"name":"EventNotificationRemoveRequest","frequency":"Low","id":"182","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"EventData","type":"Single","count":1,"params":[{"name":"EventID","type":"U32","size":1}]}]},{"name":"EventGodDelete","frequency":"Low","id":"183","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"EventData","type":"Single","count":1,"params":[{"name":"EventID","type":"U32","size":1}]},{"name":"QueryData","type":"Single","count":1,"params":[{"name":"QueryID","type":"LLUUID","size":1},{"name":"QueryText","type":"Variable","size":"1"},{"name":"QueryFlags","type":"U32","size":1},{"name":"QueryStart","type":"S32","size":1}]}]},{"name":"PickInfoReply","frequency":"Low","id":"184","flags":["Trusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1}]},{"name":"Data","type":"Single","count":1,"params":[{"name":"PickID","type":"LLUUID","size":1},{"name":"CreatorID","type":"LLUUID","size":1},{"name":"TopPick","type":"BOOL","size":1},{"name":"ParcelID","type":"LLUUID","size":1},{"name":"Name","type":"Variable","size":"1"},{"name":"Desc","type":"Variable","size":"2"},{"name":"SnapshotID","type":"LLUUID","size":1},{"name":"User","type":"Variable","size":"1"},{"name":"OriginalName","type":"Variable","size":"1"},{"name":"SimName","type":"Variable","size":"1"},{"name":"PosGlobal","type":"LLVector3d","size":1},{"name":"SortOrder","type":"S32","size":1},{"name":"Enabled","type":"BOOL","size":1}]}]},{"name":"PickInfoUpdate","frequency":"Low","id":"185","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"Data","type":"Single","count":1,"params":[{"name":"PickID","type":"LLUUID","size":1},{"name":"CreatorID","type":"LLUUID","size":1},{"name":"TopPick","type":"BOOL","size":1},{"name":"ParcelID","type":"LLUUID","size":1},{"name":"Name","type":"Variable","size":"1"},{"name":"Desc","type":"Variable","size":"2"},{"name":"SnapshotID","type":"LLUUID","size":1},{"name":"PosGlobal","type":"LLVector3d","size":1},{"name":"SortOrder","type":"S32","size":1},{"name":"Enabled","type":"BOOL","size":1}]}]},{"name":"PickDelete","frequency":"Low","id":"186","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"Data","type":"Single","count":1,"params":[{"name":"PickID","type":"LLUUID","size":1}]}]},{"name":"PickGodDelete","frequency":"Low","id":"187","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"Data","type":"Single","count":1,"params":[{"name":"PickID","type":"LLUUID","size":1},{"name":"QueryID","type":"LLUUID","size":1}]}]},{"name":"ScriptQuestion","frequency":"Low","id":"188","flags":["Trusted","Unencoded"],"blocks":[{"name":"Data","type":"Single","count":1,"params":[{"name":"TaskID","type":"LLUUID","size":1},{"name":"ItemID","type":"LLUUID","size":1},{"name":"ObjectName","type":"Variable","size":"1"},{"name":"ObjectOwner","type":"Variable","size":"1"},{"name":"Questions","type":"S32","size":1}]},{"name":"Experience","type":"Single","count":1,"params":[{"name":"ExperienceID","type":"LLUUID","size":1}]}]},{"name":"ScriptControlChange","frequency":"Low","id":"189","flags":["Trusted","Unencoded"],"blocks":[{"name":"Data","type":"Variable","count":1,"params":[{"name":"TakeControls","type":"BOOL","size":1},{"name":"Controls","type":"U32","size":1},{"name":"PassToAgent","type":"BOOL","size":1}]}]},{"name":"ScriptDialog","frequency":"Low","id":"190","flags":["Trusted","Zerocoded"],"blocks":[{"name":"Data","type":"Single","count":1,"params":[{"name":"ObjectID","type":"LLUUID","size":1},{"name":"FirstName","type":"Variable","size":"1"},{"name":"LastName","type":"Variable","size":"1"},{"name":"ObjectName","type":"Variable","size":"1"},{"name":"Message","type":"Variable","size":"2"},{"name":"ChatChannel","type":"S32","size":1},{"name":"ImageID","type":"LLUUID","size":1}]},{"name":"Buttons","type":"Variable","count":1,"params":[{"name":"ButtonLabel","type":"Variable","size":"1"}]},{"name":"OwnerData","type":"Variable","count":1,"params":[{"name":"OwnerID","type":"LLUUID","size":1}]}]},{"name":"ScriptDialogReply","frequency":"Low","id":"191","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"Data","type":"Single","count":1,"params":[{"name":"ObjectID","type":"LLUUID","size":1},{"name":"ChatChannel","type":"S32","size":1},{"name":"ButtonIndex","type":"S32","size":1},{"name":"ButtonLabel","type":"Variable","size":"1"}]}]},{"name":"ForceScriptControlRelease","frequency":"Low","id":"192","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]}]},{"name":"RevokePermissions","frequency":"Low","id":"193","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"Data","type":"Single","count":1,"params":[{"name":"ObjectID","type":"LLUUID","size":1},{"name":"ObjectPermissions","type":"U32","size":1}]}]},{"name":"LoadURL","frequency":"Low","id":"194","flags":["Trusted","Unencoded"],"blocks":[{"name":"Data","type":"Single","count":1,"params":[{"name":"ObjectName","type":"Variable","size":"1"},{"name":"ObjectID","type":"LLUUID","size":1},{"name":"OwnerID","type":"LLUUID","size":1},{"name":"OwnerIsGroup","type":"BOOL","size":1},{"name":"Message","type":"Variable","size":"1"},{"name":"URL","type":"Variable","size":"1"}]}]},{"name":"ScriptTeleportRequest","frequency":"Low","id":"195","flags":["Trusted","Unencoded"],"blocks":[{"name":"Data","type":"Single","count":1,"params":[{"name":"ObjectName","type":"Variable","size":"1"},{"name":"SimName","type":"Variable","size":"1"},{"name":"SimPosition","type":"LLVector3","size":1},{"name":"LookAt","type":"LLVector3","size":1}]}]},{"name":"ParcelOverlay","frequency":"Low","id":"196","flags":["Trusted","Zerocoded"],"blocks":[{"name":"ParcelData","type":"Single","count":1,"params":[{"name":"SequenceID","type":"S32","size":1},{"name":"Data","type":"Variable","size":"2"}]}]},{"name":"ParcelPropertiesRequest","frequency":"Medium","id":"11","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"ParcelData","type":"Single","count":1,"params":[{"name":"SequenceID","type":"S32","size":1},{"name":"West","type":"F32","size":1},{"name":"South","type":"F32","size":1},{"name":"East","type":"F32","size":1},{"name":"North","type":"F32","size":1},{"name":"SnapSelection","type":"BOOL","size":1}]}]},{"name":"ParcelPropertiesRequestByID","frequency":"Low","id":"197","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"ParcelData","type":"Single","count":1,"params":[{"name":"SequenceID","type":"S32","size":1},{"name":"LocalID","type":"S32","size":1}]}]},{"name":"ParcelProperties","frequency":"High","id":"23","flags":["Trusted","Zerocoded","UDPDeprecated"],"blocks":[{"name":"ParcelData","type":"Single","count":1,"params":[{"name":"RequestResult","type":"S32","size":1},{"name":"SequenceID","type":"S32","size":1},{"name":"SnapSelection","type":"BOOL","size":1},{"name":"SelfCount","type":"S32","size":1},{"name":"OtherCount","type":"S32","size":1},{"name":"PublicCount","type":"S32","size":1},{"name":"LocalID","type":"S32","size":1},{"name":"OwnerID","type":"LLUUID","size":1},{"name":"IsGroupOwned","type":"BOOL","size":1},{"name":"AuctionID","type":"U32","size":1},{"name":"ClaimDate","type":"S32","size":1},{"name":"ClaimPrice","type":"S32","size":1},{"name":"RentPrice","type":"S32","size":1},{"name":"AABBMin","type":"LLVector3","size":1},{"name":"AABBMax","type":"LLVector3","size":1},{"name":"Bitmap","type":"Variable","size":"2"},{"name":"Area","type":"S32","size":1},{"name":"Status","type":"U8","size":1},{"name":"SimWideMaxPrims","type":"S32","size":1},{"name":"SimWideTotalPrims","type":"S32","size":1},{"name":"MaxPrims","type":"S32","size":1},{"name":"TotalPrims","type":"S32","size":1},{"name":"OwnerPrims","type":"S32","size":1},{"name":"GroupPrims","type":"S32","size":1},{"name":"OtherPrims","type":"S32","size":1},{"name":"SelectedPrims","type":"S32","size":1},{"name":"ParcelPrimBonus","type":"F32","size":1},{"name":"OtherCleanTime","type":"S32","size":1},{"name":"ParcelFlags","type":"U32","size":1},{"name":"SalePrice","type":"S32","size":1},{"name":"Name","type":"Variable","size":"1"},{"name":"Desc","type":"Variable","size":"1"},{"name":"MusicURL","type":"Variable","size":"1"},{"name":"MediaURL","type":"Variable","size":"1"},{"name":"MediaID","type":"LLUUID","size":1},{"name":"MediaAutoScale","type":"U8","size":1},{"name":"GroupID","type":"LLUUID","size":1},{"name":"PassPrice","type":"S32","size":1},{"name":"PassHours","type":"F32","size":1},{"name":"Category","type":"U8","size":1},{"name":"AuthBuyerID","type":"LLUUID","size":1},{"name":"SnapshotID","type":"LLUUID","size":1},{"name":"UserLocation","type":"LLVector3","size":1},{"name":"UserLookAt","type":"LLVector3","size":1},{"name":"LandingType","type":"U8","size":1},{"name":"RegionPushOverride","type":"BOOL","size":1},{"name":"RegionDenyAnonymous","type":"BOOL","size":1},{"name":"RegionDenyIdentified","type":"BOOL","size":1},{"name":"RegionDenyTransacted","type":"BOOL","size":1}]},{"name":"AgeVerificationBlock","type":"Single","count":1,"params":[{"name":"RegionDenyAgeUnverified","type":"BOOL","size":1}]},{"name":"RegionAllowAccessBlock","type":"Single","count":1,"params":[{"name":"RegionAllowAccessOverride","type":"BOOL","size":1}]}]},{"name":"ParcelPropertiesUpdate","frequency":"Low","id":"198","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"ParcelData","type":"Single","count":1,"params":[{"name":"LocalID","type":"S32","size":1},{"name":"Flags","type":"U32","size":1},{"name":"ParcelFlags","type":"U32","size":1},{"name":"SalePrice","type":"S32","size":1},{"name":"Name","type":"Variable","size":"1"},{"name":"Desc","type":"Variable","size":"1"},{"name":"MusicURL","type":"Variable","size":"1"},{"name":"MediaURL","type":"Variable","size":"1"},{"name":"MediaID","type":"LLUUID","size":1},{"name":"MediaAutoScale","type":"U8","size":1},{"name":"GroupID","type":"LLUUID","size":1},{"name":"PassPrice","type":"S32","size":1},{"name":"PassHours","type":"F32","size":1},{"name":"Category","type":"U8","size":1},{"name":"AuthBuyerID","type":"LLUUID","size":1},{"name":"SnapshotID","type":"LLUUID","size":1},{"name":"UserLocation","type":"LLVector3","size":1},{"name":"UserLookAt","type":"LLVector3","size":1},{"name":"LandingType","type":"U8","size":1}]}]},{"name":"ParcelReturnObjects","frequency":"Low","id":"199","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"ParcelData","type":"Single","count":1,"params":[{"name":"LocalID","type":"S32","size":1},{"name":"ReturnType","type":"U32","size":1}]},{"name":"TaskIDs","type":"Variable","count":1,"params":[{"name":"TaskID","type":"LLUUID","size":1}]},{"name":"OwnerIDs","type":"Variable","count":1,"params":[{"name":"OwnerID","type":"LLUUID","size":1}]}]},{"name":"ParcelSetOtherCleanTime","frequency":"Low","id":"200","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"ParcelData","type":"Single","count":1,"params":[{"name":"LocalID","type":"S32","size":1},{"name":"OtherCleanTime","type":"S32","size":1}]}]},{"name":"ParcelDisableObjects","frequency":"Low","id":"201","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"ParcelData","type":"Single","count":1,"params":[{"name":"LocalID","type":"S32","size":1},{"name":"ReturnType","type":"U32","size":1}]},{"name":"TaskIDs","type":"Variable","count":1,"params":[{"name":"TaskID","type":"LLUUID","size":1}]},{"name":"OwnerIDs","type":"Variable","count":1,"params":[{"name":"OwnerID","type":"LLUUID","size":1}]}]},{"name":"ParcelSelectObjects","frequency":"Low","id":"202","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"ParcelData","type":"Single","count":1,"params":[{"name":"LocalID","type":"S32","size":1},{"name":"ReturnType","type":"U32","size":1}]},{"name":"ReturnIDs","type":"Variable","count":1,"params":[{"name":"ReturnID","type":"LLUUID","size":1}]}]},{"name":"EstateCovenantRequest","frequency":"Low","id":"203","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]}]},{"name":"EstateCovenantReply","frequency":"Low","id":"204","flags":["Trusted","Unencoded"],"blocks":[{"name":"Data","type":"Single","count":1,"params":[{"name":"CovenantID","type":"LLUUID","size":1},{"name":"CovenantTimestamp","type":"U32","size":1},{"name":"EstateName","type":"Variable","size":"1"},{"name":"EstateOwnerID","type":"LLUUID","size":1}]}]},{"name":"ForceObjectSelect","frequency":"Low","id":"205","flags":["Trusted","Unencoded"],"blocks":[{"name":"Header","type":"Single","count":1,"params":[{"name":"ResetList","type":"BOOL","size":1}]},{"name":"Data","type":"Variable","count":1,"params":[{"name":"LocalID","type":"U32","size":1}]}]},{"name":"ParcelBuyPass","frequency":"Low","id":"206","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"ParcelData","type":"Single","count":1,"params":[{"name":"LocalID","type":"S32","size":1}]}]},{"name":"ParcelDeedToGroup","frequency":"Low","id":"207","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"Data","type":"Single","count":1,"params":[{"name":"GroupID","type":"LLUUID","size":1},{"name":"LocalID","type":"S32","size":1}]}]},{"name":"ParcelReclaim","frequency":"Low","id":"208","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"Data","type":"Single","count":1,"params":[{"name":"LocalID","type":"S32","size":1}]}]},{"name":"ParcelClaim","frequency":"Low","id":"209","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"Data","type":"Single","count":1,"params":[{"name":"GroupID","type":"LLUUID","size":1},{"name":"IsGroupOwned","type":"BOOL","size":1},{"name":"Final","type":"BOOL","size":1}]},{"name":"ParcelData","type":"Variable","count":1,"params":[{"name":"West","type":"F32","size":1},{"name":"South","type":"F32","size":1},{"name":"East","type":"F32","size":1},{"name":"North","type":"F32","size":1}]}]},{"name":"ParcelJoin","frequency":"Low","id":"210","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"ParcelData","type":"Single","count":1,"params":[{"name":"West","type":"F32","size":1},{"name":"South","type":"F32","size":1},{"name":"East","type":"F32","size":1},{"name":"North","type":"F32","size":1}]}]},{"name":"ParcelDivide","frequency":"Low","id":"211","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"ParcelData","type":"Single","count":1,"params":[{"name":"West","type":"F32","size":1},{"name":"South","type":"F32","size":1},{"name":"East","type":"F32","size":1},{"name":"North","type":"F32","size":1}]}]},{"name":"ParcelRelease","frequency":"Low","id":"212","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"Data","type":"Single","count":1,"params":[{"name":"LocalID","type":"S32","size":1}]}]},{"name":"ParcelBuy","frequency":"Low","id":"213","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"Data","type":"Single","count":1,"params":[{"name":"GroupID","type":"LLUUID","size":1},{"name":"IsGroupOwned","type":"BOOL","size":1},{"name":"RemoveContribution","type":"BOOL","size":1},{"name":"LocalID","type":"S32","size":1},{"name":"Final","type":"BOOL","size":1}]},{"name":"ParcelData","type":"Single","count":1,"params":[{"name":"Price","type":"S32","size":1},{"name":"Area","type":"S32","size":1}]}]},{"name":"ParcelGodForceOwner","frequency":"Low","id":"214","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"Data","type":"Single","count":1,"params":[{"name":"OwnerID","type":"LLUUID","size":1},{"name":"LocalID","type":"S32","size":1}]}]},{"name":"ParcelAccessListRequest","frequency":"Low","id":"215","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"Data","type":"Single","count":1,"params":[{"name":"SequenceID","type":"S32","size":1},{"name":"Flags","type":"U32","size":1},{"name":"LocalID","type":"S32","size":1}]}]},{"name":"ParcelAccessListReply","frequency":"Low","id":"216","flags":["Trusted","Zerocoded"],"blocks":[{"name":"Data","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SequenceID","type":"S32","size":1},{"name":"Flags","type":"U32","size":1},{"name":"LocalID","type":"S32","size":1}]},{"name":"List","type":"Variable","count":1,"params":[{"name":"ID","type":"LLUUID","size":1},{"name":"Time","type":"S32","size":1},{"name":"Flags","type":"U32","size":1}]}]},{"name":"ParcelAccessListUpdate","frequency":"Low","id":"217","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"Data","type":"Single","count":1,"params":[{"name":"Flags","type":"U32","size":1},{"name":"LocalID","type":"S32","size":1},{"name":"TransactionID","type":"LLUUID","size":1},{"name":"SequenceID","type":"S32","size":1},{"name":"Sections","type":"S32","size":1}]},{"name":"List","type":"Variable","count":1,"params":[{"name":"ID","type":"LLUUID","size":1},{"name":"Time","type":"S32","size":1},{"name":"Flags","type":"U32","size":1}]}]},{"name":"ParcelDwellRequest","frequency":"Low","id":"218","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"Data","type":"Single","count":1,"params":[{"name":"LocalID","type":"S32","size":1},{"name":"ParcelID","type":"LLUUID","size":1}]}]},{"name":"ParcelDwellReply","frequency":"Low","id":"219","flags":["Trusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1}]},{"name":"Data","type":"Single","count":1,"params":[{"name":"LocalID","type":"S32","size":1},{"name":"ParcelID","type":"LLUUID","size":1},{"name":"Dwell","type":"F32","size":1}]}]},{"name":"RequestParcelTransfer","frequency":"Low","id":"220","flags":["Trusted","Zerocoded"],"blocks":[{"name":"Data","type":"Single","count":1,"params":[{"name":"TransactionID","type":"LLUUID","size":1},{"name":"TransactionTime","type":"U32","size":1},{"name":"SourceID","type":"LLUUID","size":1},{"name":"DestID","type":"LLUUID","size":1},{"name":"OwnerID","type":"LLUUID","size":1},{"name":"Flags","type":"U8","size":1},{"name":"TransactionType","type":"S32","size":1},{"name":"Amount","type":"S32","size":1},{"name":"BillableArea","type":"S32","size":1},{"name":"ActualArea","type":"S32","size":1},{"name":"Final","type":"BOOL","size":1}]},{"name":"RegionData","type":"Single","count":"//","params":[{"name":"RegionID","type":"LLUUID","size":1},{"name":"GridX","type":"U32","size":1},{"name":"GridY","type":"U32","size":1}]}]},{"name":"UpdateParcel","frequency":"Low","id":"221","flags":["Trusted","Zerocoded"],"blocks":[{"name":"ParcelData","type":"Single","count":1,"params":[{"name":"ParcelID","type":"LLUUID","size":1},{"name":"RegionHandle","type":"U64","size":1},{"name":"OwnerID","type":"LLUUID","size":1},{"name":"GroupOwned","type":"BOOL","size":1},{"name":"Status","type":"U8","size":1},{"name":"Name","type":"Variable","size":"1"},{"name":"Description","type":"Variable","size":"1"},{"name":"MusicURL","type":"Variable","size":"1"},{"name":"RegionX","type":"F32","size":1},{"name":"RegionY","type":"F32","size":1},{"name":"ActualArea","type":"S32","size":1},{"name":"BillableArea","type":"S32","size":1},{"name":"ShowDir","type":"BOOL","size":1},{"name":"IsForSale","type":"BOOL","size":1},{"name":"Category","type":"U8","size":1},{"name":"SnapshotID","type":"LLUUID","size":1},{"name":"UserLocation","type":"LLVector3","size":1},{"name":"SalePrice","type":"S32","size":1},{"name":"AuthorizedBuyerID","type":"LLUUID","size":1},{"name":"AllowPublish","type":"BOOL","size":1},{"name":"MaturePublish","type":"BOOL","size":1}]}]},{"name":"RemoveParcel","frequency":"Low","id":"222","flags":["Trusted","Unencoded"],"blocks":[{"name":"ParcelData","type":"Variable","count":1,"params":[{"name":"ParcelID","type":"LLUUID","size":1}]}]},{"name":"MergeParcel","frequency":"Low","id":"223","flags":["Trusted","Unencoded"],"blocks":[{"name":"MasterParcelData","type":"Single","count":1,"params":[{"name":"MasterID","type":"LLUUID","size":1}]},{"name":"SlaveParcelData","type":"Variable","count":1,"params":[{"name":"SlaveID","type":"LLUUID","size":1}]}]},{"name":"LogParcelChanges","frequency":"Low","id":"224","flags":["Trusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1}]},{"name":"RegionData","type":"Single","count":1,"params":[{"name":"RegionHandle","type":"U64","size":1}]},{"name":"ParcelData","type":"Variable","count":1,"params":[{"name":"ParcelID","type":"LLUUID","size":1},{"name":"OwnerID","type":"LLUUID","size":1},{"name":"IsOwnerGroup","type":"BOOL","size":1},{"name":"ActualArea","type":"S32","size":1},{"name":"Action","type":"S8","size":1},{"name":"TransactionID","type":"LLUUID","size":1}]}]},{"name":"CheckParcelSales","frequency":"Low","id":"225","flags":["Trusted","Unencoded"],"blocks":[{"name":"RegionData","type":"Variable","count":1,"params":[{"name":"RegionHandle","type":"U64","size":1}]}]},{"name":"ParcelSales","frequency":"Low","id":"226","flags":["Trusted","Unencoded"],"blocks":[{"name":"ParcelData","type":"Variable","count":1,"params":[{"name":"ParcelID","type":"LLUUID","size":1},{"name":"BuyerID","type":"LLUUID","size":1}]}]},{"name":"ParcelGodMarkAsContent","frequency":"Low","id":"227","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"ParcelData","type":"Single","count":1,"params":[{"name":"LocalID","type":"S32","size":1}]}]},{"name":"ViewerStartAuction","frequency":"Low","id":"228","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"ParcelData","type":"Single","count":1,"params":[{"name":"LocalID","type":"S32","size":1},{"name":"SnapshotID","type":"LLUUID","size":1}]}]},{"name":"StartAuction","frequency":"Low","id":"229","flags":["Trusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1}]},{"name":"ParcelData","type":"Single","count":1,"params":[{"name":"ParcelID","type":"LLUUID","size":1},{"name":"SnapshotID","type":"LLUUID","size":1},{"name":"Name","type":"Variable","size":"1"}]}]},{"name":"ConfirmAuctionStart","frequency":"Low","id":"230","flags":["Trusted","Unencoded"],"blocks":[{"name":"AuctionData","type":"Single","count":1,"params":[{"name":"ParcelID","type":"LLUUID","size":1},{"name":"AuctionID","type":"U32","size":1}]}]},{"name":"CompleteAuction","frequency":"Low","id":"231","flags":["Trusted","Unencoded"],"blocks":[{"name":"ParcelData","type":"Variable","count":1,"params":[{"name":"ParcelID","type":"LLUUID","size":1}]}]},{"name":"CancelAuction","frequency":"Low","id":"232","flags":["Trusted","Unencoded"],"blocks":[{"name":"ParcelData","type":"Variable","count":1,"params":[{"name":"ParcelID","type":"LLUUID","size":1}]}]},{"name":"CheckParcelAuctions","frequency":"Low","id":"233","flags":["Trusted","Unencoded"],"blocks":[{"name":"RegionData","type":"Variable","count":1,"params":[{"name":"RegionHandle","type":"U64","size":1}]}]},{"name":"ParcelAuctions","frequency":"Low","id":"234","flags":["Trusted","Unencoded"],"blocks":[{"name":"ParcelData","type":"Variable","count":1,"params":[{"name":"ParcelID","type":"LLUUID","size":1},{"name":"WinnerID","type":"LLUUID","size":1}]}]},{"name":"UUIDNameRequest","frequency":"Low","id":"235","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"UUIDNameBlock","type":"Variable","count":1,"params":[{"name":"ID","type":"LLUUID","size":1}]}]},{"name":"UUIDNameReply","frequency":"Low","id":"236","flags":["Trusted","Unencoded"],"blocks":[{"name":"UUIDNameBlock","type":"Variable","count":1,"params":[{"name":"ID","type":"LLUUID","size":1},{"name":"FirstName","type":"Variable","size":"1"},{"name":"LastName","type":"Variable","size":"1"}]}]},{"name":"UUIDGroupNameRequest","frequency":"Low","id":"237","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"UUIDNameBlock","type":"Variable","count":1,"params":[{"name":"ID","type":"LLUUID","size":1}]}]},{"name":"UUIDGroupNameReply","frequency":"Low","id":"238","flags":["Trusted","Unencoded"],"blocks":[{"name":"UUIDNameBlock","type":"Variable","count":1,"params":[{"name":"ID","type":"LLUUID","size":1},{"name":"GroupName","type":"Variable","size":"1"}]}]},{"name":"ChatPass","frequency":"Low","id":"239","flags":["Trusted","Zerocoded"],"blocks":[{"name":"ChatData","type":"Single","count":1,"params":[{"name":"Channel","type":"S32","size":1},{"name":"Position","type":"LLVector3","size":1},{"name":"ID","type":"LLUUID","size":1},{"name":"OwnerID","type":"LLUUID","size":1},{"name":"Name","type":"Variable","size":"1"},{"name":"SourceType","type":"U8","size":1},{"name":"Type","type":"U8","size":1},{"name":"Radius","type":"F32","size":1},{"name":"SimAccess","type":"U8","size":1},{"name":"Message","type":"Variable","size":"2"}]}]},{"name":"EdgeDataPacket","frequency":"High","id":"24","flags":["Trusted","Zerocoded"],"blocks":[{"name":"EdgeData","type":"Single","count":1,"params":[{"name":"LayerType","type":"U8","size":1},{"name":"Direction","type":"U8","size":1},{"name":"LayerData","type":"Variable","size":"2"}]}]},{"name":"SimStatus","frequency":"Medium","id":"12","flags":["Trusted","Unencoded"],"blocks":[{"name":"SimStatus","type":"Single","count":1,"params":[{"name":"CanAcceptAgents","type":"BOOL","size":1},{"name":"CanAcceptTasks","type":"BOOL","size":1}]},{"name":"SimFlags","type":"Single","count":1,"params":[{"name":"Flags","type":"U64","size":1}]}]},{"name":"ChildAgentUpdate","frequency":"High","id":"25","flags":["Trusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"RegionHandle","type":"U64","size":1},{"name":"ViewerCircuitCode","type":"U32","size":1},{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"AgentPos","type":"LLVector3","size":1},{"name":"AgentVel","type":"LLVector3","size":1},{"name":"Center","type":"LLVector3","size":1},{"name":"Size","type":"LLVector3","size":1},{"name":"AtAxis","type":"LLVector3","size":1},{"name":"LeftAxis","type":"LLVector3","size":1},{"name":"UpAxis","type":"LLVector3","size":1},{"name":"ChangedGrid","type":"BOOL","size":1},{"name":"Far","type":"F32","size":1},{"name":"Aspect","type":"F32","size":1},{"name":"Throttles","type":"Variable","size":"1"},{"name":"LocomotionState","type":"U32","size":1},{"name":"HeadRotation","type":"LLQuaternion","size":1},{"name":"BodyRotation","type":"LLQuaternion","size":1},{"name":"ControlFlags","type":"U32","size":1},{"name":"EnergyLevel","type":"F32","size":1},{"name":"GodLevel","type":"U8","size":1},{"name":"AlwaysRun","type":"BOOL","size":1},{"name":"PreyAgent","type":"LLUUID","size":1},{"name":"AgentAccess","type":"U8","size":1},{"name":"AgentTextures","type":"Variable","size":"2"},{"name":"ActiveGroupID","type":"LLUUID","size":1}]},{"name":"GroupData","type":"Variable","count":1,"params":[{"name":"GroupID","type":"LLUUID","size":1},{"name":"GroupPowers","type":"U64","size":1},{"name":"AcceptNotices","type":"BOOL","size":1}]},{"name":"AnimationData","type":"Variable","count":1,"params":[{"name":"Animation","type":"LLUUID","size":1},{"name":"ObjectID","type":"LLUUID","size":1}]},{"name":"GranterBlock","type":"Variable","count":1,"params":[{"name":"GranterID","type":"LLUUID","size":1}]},{"name":"NVPairData","type":"Variable","count":1,"params":[{"name":"NVPairs","type":"Variable","size":"2"}]},{"name":"VisualParam","type":"Variable","count":1,"params":[{"name":"ParamValue","type":"U8","size":1}]},{"name":"AgentAccess","type":"Variable","count":1,"params":[{"name":"AgentLegacyAccess","type":"U8","size":1},{"name":"AgentMaxAccess","type":"U8","size":1}]},{"name":"AgentInfo","type":"Variable","count":1,"params":[{"name":"Flags","type":"U32","size":1}]},{"name":"AgentInventoryHost","type":"Variable","count":1,"params":[{"name":"InventoryHost","type":"Variable","size":"1"}]}]},{"name":"ChildAgentAlive","frequency":"High","id":"26","flags":["Trusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"RegionHandle","type":"U64","size":1},{"name":"ViewerCircuitCode","type":"U32","size":1},{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]}]},{"name":"ChildAgentPositionUpdate","frequency":"High","id":"27","flags":["Trusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"RegionHandle","type":"U64","size":1},{"name":"ViewerCircuitCode","type":"U32","size":1},{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"AgentPos","type":"LLVector3","size":1},{"name":"AgentVel","type":"LLVector3","size":1},{"name":"Center","type":"LLVector3","size":1},{"name":"Size","type":"LLVector3","size":1},{"name":"AtAxis","type":"LLVector3","size":1},{"name":"LeftAxis","type":"LLVector3","size":1},{"name":"UpAxis","type":"LLVector3","size":1},{"name":"ChangedGrid","type":"BOOL","size":1}]}]},{"name":"ChildAgentDying","frequency":"Low","id":"240","flags":["Trusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]}]},{"name":"ChildAgentUnknown","frequency":"Low","id":"241","flags":["Trusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]}]},{"name":"AtomicPassObject","frequency":"High","id":"28","flags":["Trusted","Unencoded"],"blocks":[{"name":"TaskData","type":"Single","count":1,"params":[{"name":"TaskID","type":"LLUUID","size":1},{"name":"AttachmentNeedsSave","type":"BOOL","size":1}]}]},{"name":"KillChildAgents","frequency":"Low","id":"242","flags":["Trusted","Unencoded"],"blocks":[{"name":"IDBlock","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1}]}]},{"name":"GetScriptRunning","frequency":"Low","id":"243","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"Script","type":"Single","count":1,"params":[{"name":"ObjectID","type":"LLUUID","size":1},{"name":"ItemID","type":"LLUUID","size":1}]}]},{"name":"ScriptRunningReply","frequency":"Low","id":"244","flags":["NotTrusted","Unencoded","UDPDeprecated"],"blocks":[{"name":"Script","type":"Single","count":1,"params":[{"name":"ObjectID","type":"LLUUID","size":1},{"name":"ItemID","type":"LLUUID","size":1},{"name":"Running","type":"BOOL","size":1},{"name":"Mono","type":"BOOL","size":1}]}]},{"name":"SetScriptRunning","frequency":"Low","id":"245","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"Script","type":"Single","count":1,"params":[{"name":"ObjectID","type":"LLUUID","size":1},{"name":"ItemID","type":"LLUUID","size":1},{"name":"Running","type":"BOOL","size":1}]}]},{"name":"ScriptReset","frequency":"Low","id":"246","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"Script","type":"Single","count":1,"params":[{"name":"ObjectID","type":"LLUUID","size":1},{"name":"ItemID","type":"LLUUID","size":1}]}]},{"name":"ScriptSensorRequest","frequency":"Low","id":"247","flags":["Trusted","Zerocoded"],"blocks":[{"name":"Requester","type":"Single","count":1,"params":[{"name":"SourceID","type":"LLUUID","size":1},{"name":"RequestID","type":"LLUUID","size":1},{"name":"SearchID","type":"LLUUID","size":1},{"name":"SearchPos","type":"LLVector3","size":1},{"name":"SearchDir","type":"LLQuaternion","size":1},{"name":"SearchName","type":"Variable","size":"1"},{"name":"Type","type":"S32","size":1},{"name":"Range","type":"F32","size":1},{"name":"Arc","type":"F32","size":1},{"name":"RegionHandle","type":"U64","size":1},{"name":"SearchRegions","type":"U8","size":1}]}]},{"name":"ScriptSensorReply","frequency":"Low","id":"248","flags":["Trusted","Zerocoded"],"blocks":[{"name":"Requester","type":"Single","count":1,"params":[{"name":"SourceID","type":"LLUUID","size":1}]},{"name":"SensedData","type":"Variable","count":1,"params":[{"name":"ObjectID","type":"LLUUID","size":1},{"name":"OwnerID","type":"LLUUID","size":1},{"name":"GroupID","type":"LLUUID","size":1},{"name":"Position","type":"LLVector3","size":1},{"name":"Velocity","type":"LLVector3","size":1},{"name":"Rotation","type":"LLQuaternion","size":1},{"name":"Name","type":"Variable","size":"1"},{"name":"Type","type":"S32","size":1},{"name":"Range","type":"F32","size":1}]}]},{"name":"CompleteAgentMovement","frequency":"Low","id":"249","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"CircuitCode","type":"U32","size":1}]}]},{"name":"AgentMovementComplete","frequency":"Low","id":"250","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"Data","type":"Single","count":1,"params":[{"name":"Position","type":"LLVector3","size":1},{"name":"LookAt","type":"LLVector3","size":1},{"name":"RegionHandle","type":"U64","size":1},{"name":"Timestamp","type":"U32","size":1}]},{"name":"SimData","type":"Single","count":1,"params":[{"name":"ChannelVersion","type":"Variable","size":"2"}]}]},{"name":"DataServerLogout","frequency":"Low","id":"251","flags":["Trusted","Unencoded"],"blocks":[{"name":"UserData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"ViewerIP","type":"IPADDR","size":1},{"name":"Disconnect","type":"BOOL","size":1},{"name":"SessionID","type":"LLUUID","size":1}]}]},{"name":"LogoutRequest","frequency":"Low","id":"252","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]}]},{"name":"LogoutReply","frequency":"Low","id":"253","flags":["Trusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"InventoryData","type":"Variable","count":1,"params":[{"name":"ItemID","type":"LLUUID","size":1}]}]},{"name":"ImprovedInstantMessage","frequency":"Low","id":"254","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"MessageBlock","type":"Single","count":1,"params":[{"name":"FromGroup","type":"BOOL","size":1},{"name":"ToAgentID","type":"LLUUID","size":1},{"name":"ParentEstateID","type":"U32","size":1},{"name":"RegionID","type":"LLUUID","size":1},{"name":"Position","type":"LLVector3","size":1},{"name":"Offline","type":"U8","size":1},{"name":"Dialog","type":"U8","size":1},{"name":"ID","type":"LLUUID","size":1},{"name":"Timestamp","type":"U32","size":1},{"name":"FromAgentName","type":"Variable","size":"1"},{"name":"Message","type":"Variable","size":"2"},{"name":"BinaryBucket","type":"Variable","size":"2"}]},{"name":"EstateBlock","type":"Single","count":1,"params":[{"name":"EstateID","type":"U32","size":1}]}]},{"name":"RetrieveInstantMessages","frequency":"Low","id":"255","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]}]},{"name":"FindAgent","frequency":"Low","id":"256","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentBlock","type":"Single","count":1,"params":[{"name":"Hunter","type":"LLUUID","size":1},{"name":"Prey","type":"LLUUID","size":1},{"name":"SpaceIP","type":"IPADDR","size":1}]},{"name":"LocationBlock","type":"Variable","count":1,"params":[{"name":"GlobalX","type":"F64","size":1},{"name":"GlobalY","type":"F64","size":1}]}]},{"name":"RequestGodlikePowers","frequency":"Low","id":"257","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"RequestBlock","type":"Single","count":1,"params":[{"name":"Godlike","type":"BOOL","size":1},{"name":"Token","type":"LLUUID","size":1}]}]},{"name":"GrantGodlikePowers","frequency":"Low","id":"258","flags":["Trusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"GrantData","type":"Single","count":1,"params":[{"name":"GodLevel","type":"U8","size":1},{"name":"Token","type":"LLUUID","size":1}]}]},{"name":"GodlikeMessage","frequency":"Low","id":"259","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"TransactionID","type":"LLUUID","size":1}]},{"name":"MethodData","type":"Single","count":1,"params":[{"name":"Method","type":"Variable","size":"1"},{"name":"Invoice","type":"LLUUID","size":1}]},{"name":"ParamList","type":"Variable","count":1,"params":[{"name":"Parameter","type":"Variable","size":"1"}]}]},{"name":"EstateOwnerMessage","frequency":"Low","id":"260","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"TransactionID","type":"LLUUID","size":1}]},{"name":"MethodData","type":"Single","count":1,"params":[{"name":"Method","type":"Variable","size":"1"},{"name":"Invoice","type":"LLUUID","size":1}]},{"name":"ParamList","type":"Variable","count":1,"params":[{"name":"Parameter","type":"Variable","size":"1"}]}]},{"name":"GenericMessage","frequency":"Low","id":"261","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"TransactionID","type":"LLUUID","size":1}]},{"name":"MethodData","type":"Single","count":1,"params":[{"name":"Method","type":"Variable","size":"1"},{"name":"Invoice","type":"LLUUID","size":1}]},{"name":"ParamList","type":"Variable","count":1,"params":[{"name":"Parameter","type":"Variable","size":"1"}]}]},{"name":"MuteListRequest","frequency":"Low","id":"262","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"MuteData","type":"Single","count":1,"params":[{"name":"MuteCRC","type":"U32","size":1}]}]},{"name":"UpdateMuteListEntry","frequency":"Low","id":"263","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"MuteData","type":"Single","count":1,"params":[{"name":"MuteID","type":"LLUUID","size":1},{"name":"MuteName","type":"Variable","size":"1"},{"name":"MuteType","type":"S32","size":1},{"name":"MuteFlags","type":"U32","size":1}]}]},{"name":"RemoveMuteListEntry","frequency":"Low","id":"264","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"MuteData","type":"Single","count":1,"params":[{"name":"MuteID","type":"LLUUID","size":1},{"name":"MuteName","type":"Variable","size":"1"}]}]},{"name":"CopyInventoryFromNotecard","frequency":"Low","id":"265","flags":["NotTrusted","Zerocoded","UDPDeprecated"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"NotecardData","type":"Single","count":1,"params":[{"name":"NotecardItemID","type":"LLUUID","size":1},{"name":"ObjectID","type":"LLUUID","size":1}]},{"name":"InventoryData","type":"Variable","count":1,"params":[{"name":"ItemID","type":"LLUUID","size":1},{"name":"FolderID","type":"LLUUID","size":1}]}]},{"name":"UpdateInventoryItem","frequency":"Low","id":"266","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"TransactionID","type":"LLUUID","size":1}]},{"name":"InventoryData","type":"Variable","count":1,"params":[{"name":"ItemID","type":"LLUUID","size":1},{"name":"FolderID","type":"LLUUID","size":1},{"name":"CallbackID","type":"U32","size":1},{"name":"CreatorID","type":"LLUUID","size":1},{"name":"OwnerID","type":"LLUUID","size":1},{"name":"GroupID","type":"LLUUID","size":1},{"name":"BaseMask","type":"U32","size":1},{"name":"OwnerMask","type":"U32","size":1},{"name":"GroupMask","type":"U32","size":1},{"name":"EveryoneMask","type":"U32","size":1},{"name":"NextOwnerMask","type":"U32","size":1},{"name":"GroupOwned","type":"BOOL","size":1},{"name":"TransactionID","type":"LLUUID","size":1},{"name":"Type","type":"S8","size":1},{"name":"InvType","type":"S8","size":1},{"name":"Flags","type":"U32","size":1},{"name":"SaleType","type":"U8","size":1},{"name":"SalePrice","type":"S32","size":1},{"name":"Name","type":"Variable","size":"1"},{"name":"Description","type":"Variable","size":"1"},{"name":"CreationDate","type":"S32","size":1},{"name":"CRC","type":"U32","size":1}]}]},{"name":"UpdateCreateInventoryItem","frequency":"Low","id":"267","flags":["Trusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SimApproved","type":"BOOL","size":1},{"name":"TransactionID","type":"LLUUID","size":1}]},{"name":"InventoryData","type":"Variable","count":1,"params":[{"name":"ItemID","type":"LLUUID","size":1},{"name":"FolderID","type":"LLUUID","size":1},{"name":"CallbackID","type":"U32","size":1},{"name":"CreatorID","type":"LLUUID","size":1},{"name":"OwnerID","type":"LLUUID","size":1},{"name":"GroupID","type":"LLUUID","size":1},{"name":"BaseMask","type":"U32","size":1},{"name":"OwnerMask","type":"U32","size":1},{"name":"GroupMask","type":"U32","size":1},{"name":"EveryoneMask","type":"U32","size":1},{"name":"NextOwnerMask","type":"U32","size":1},{"name":"GroupOwned","type":"BOOL","size":1},{"name":"AssetID","type":"LLUUID","size":1},{"name":"Type","type":"S8","size":1},{"name":"InvType","type":"S8","size":1},{"name":"Flags","type":"U32","size":1},{"name":"SaleType","type":"U8","size":1},{"name":"SalePrice","type":"S32","size":1},{"name":"Name","type":"Variable","size":"1"},{"name":"Description","type":"Variable","size":"1"},{"name":"CreationDate","type":"S32","size":1},{"name":"CRC","type":"U32","size":1}]}]},{"name":"MoveInventoryItem","frequency":"Low","id":"268","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"Stamp","type":"BOOL","size":1}]},{"name":"InventoryData","type":"Variable","count":1,"params":[{"name":"ItemID","type":"LLUUID","size":1},{"name":"FolderID","type":"LLUUID","size":1},{"name":"NewName","type":"Variable","size":"1"}]}]},{"name":"agent,","frequency":"inv_id","flags":[],"blocks":[]},{"name":"CopyInventoryItem","frequency":"Low","id":"269","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"InventoryData","type":"Variable","count":1,"params":[{"name":"CallbackID","type":"U32","size":1},{"name":"OldAgentID","type":"LLUUID","size":1},{"name":"OldItemID","type":"LLUUID","size":1},{"name":"NewFolderID","type":"LLUUID","size":1},{"name":"NewName","type":"Variable","size":"1"}]}]},{"name":"RemoveInventoryItem","frequency":"Low","id":"270","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"InventoryData","type":"Variable","count":1,"params":[{"name":"ItemID","type":"LLUUID","size":1}]}]},{"name":"ChangeInventoryItemFlags","frequency":"Low","id":"271","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"InventoryData","type":"Variable","count":1,"params":[{"name":"ItemID","type":"LLUUID","size":1},{"name":"Flags","type":"U32","size":1}]}]},{"name":"SaveAssetIntoInventory","frequency":"Low","id":"272","flags":["Trusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1}]},{"name":"InventoryData","type":"Single","count":1,"params":[{"name":"ItemID","type":"LLUUID","size":1},{"name":"NewAssetID","type":"LLUUID","size":1}]}]},{"name":"CreateInventoryFolder","frequency":"Low","id":"273","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"FolderData","type":"Single","count":1,"params":[{"name":"FolderID","type":"LLUUID","size":1},{"name":"ParentID","type":"LLUUID","size":1},{"name":"Type","type":"S8","size":1},{"name":"Name","type":"Variable","size":"1"}]}]},{"name":"UpdateInventoryFolder","frequency":"Low","id":"274","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"FolderData","type":"Variable","count":1,"params":[{"name":"FolderID","type":"LLUUID","size":1},{"name":"ParentID","type":"LLUUID","size":1},{"name":"Type","type":"S8","size":1},{"name":"Name","type":"Variable","size":"1"}]}]},{"name":"MoveInventoryFolder","frequency":"Low","id":"275","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"Stamp","type":"BOOL","size":1}]},{"name":"InventoryData","type":"Variable","count":1,"params":[{"name":"FolderID","type":"LLUUID","size":1},{"name":"ParentID","type":"LLUUID","size":1}]}]},{"name":"RemoveInventoryFolder","frequency":"Low","id":"276","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"FolderData","type":"Variable","count":1,"params":[{"name":"FolderID","type":"LLUUID","size":1}]}]},{"name":"FetchInventoryDescendents","frequency":"Low","id":"277","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"InventoryData","type":"Single","count":1,"params":[{"name":"FolderID","type":"LLUUID","size":1},{"name":"OwnerID","type":"LLUUID","size":1},{"name":"SortOrder","type":"S32","size":1},{"name":"FetchFolders","type":"BOOL","size":1},{"name":"FetchItems","type":"BOOL","size":1}]}]},{"name":"InventoryDescendents","frequency":"Low","id":"278","flags":["Trusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"FolderID","type":"LLUUID","size":1},{"name":"OwnerID","type":"LLUUID","size":1},{"name":"Version","type":"S32","size":1},{"name":"Descendents","type":"S32","size":1}]},{"name":"FolderData","type":"Variable","count":1,"params":[{"name":"FolderID","type":"LLUUID","size":1},{"name":"ParentID","type":"LLUUID","size":1},{"name":"Type","type":"S8","size":1},{"name":"Name","type":"Variable","size":"1"}]},{"name":"ItemData","type":"Variable","count":1,"params":[{"name":"ItemID","type":"LLUUID","size":1},{"name":"FolderID","type":"LLUUID","size":1},{"name":"CreatorID","type":"LLUUID","size":1},{"name":"OwnerID","type":"LLUUID","size":1},{"name":"GroupID","type":"LLUUID","size":1},{"name":"BaseMask","type":"U32","size":1},{"name":"OwnerMask","type":"U32","size":1},{"name":"GroupMask","type":"U32","size":1},{"name":"EveryoneMask","type":"U32","size":1},{"name":"NextOwnerMask","type":"U32","size":1},{"name":"GroupOwned","type":"BOOL","size":1},{"name":"AssetID","type":"LLUUID","size":1},{"name":"Type","type":"S8","size":1},{"name":"InvType","type":"S8","size":1},{"name":"Flags","type":"U32","size":1},{"name":"SaleType","type":"U8","size":1},{"name":"SalePrice","type":"S32","size":1},{"name":"Name","type":"Variable","size":"1"},{"name":"Description","type":"Variable","size":"1"},{"name":"CreationDate","type":"S32","size":1},{"name":"CRC","type":"U32","size":1}]}]},{"name":"FetchInventory","frequency":"Low","id":"279","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"InventoryData","type":"Variable","count":1,"params":[{"name":"OwnerID","type":"LLUUID","size":1},{"name":"ItemID","type":"LLUUID","size":1}]}]},{"name":"FetchInventoryReply","frequency":"Low","id":"280","flags":["Trusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1}]},{"name":"InventoryData","type":"Variable","count":1,"params":[{"name":"ItemID","type":"LLUUID","size":1},{"name":"FolderID","type":"LLUUID","size":1},{"name":"CreatorID","type":"LLUUID","size":1},{"name":"OwnerID","type":"LLUUID","size":1},{"name":"GroupID","type":"LLUUID","size":1},{"name":"BaseMask","type":"U32","size":1},{"name":"OwnerMask","type":"U32","size":1},{"name":"GroupMask","type":"U32","size":1},{"name":"EveryoneMask","type":"U32","size":1},{"name":"NextOwnerMask","type":"U32","size":1},{"name":"GroupOwned","type":"BOOL","size":1},{"name":"AssetID","type":"LLUUID","size":1},{"name":"Type","type":"S8","size":1},{"name":"InvType","type":"S8","size":1},{"name":"Flags","type":"U32","size":1},{"name":"SaleType","type":"U8","size":1},{"name":"SalePrice","type":"S32","size":1},{"name":"Name","type":"Variable","size":"1"},{"name":"Description","type":"Variable","size":"1"},{"name":"CreationDate","type":"S32","size":1},{"name":"CRC","type":"U32","size":1}]}]},{"name":"BulkUpdateInventory","frequency":"Low","id":"281","flags":["Trusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"TransactionID","type":"LLUUID","size":1}]},{"name":"FolderData","type":"Variable","count":1,"params":[{"name":"FolderID","type":"LLUUID","size":1},{"name":"ParentID","type":"LLUUID","size":1},{"name":"Type","type":"S8","size":1},{"name":"Name","type":"Variable","size":"1"}]},{"name":"ItemData","type":"Variable","count":1,"params":[{"name":"ItemID","type":"LLUUID","size":1},{"name":"CallbackID","type":"U32","size":1},{"name":"FolderID","type":"LLUUID","size":1},{"name":"CreatorID","type":"LLUUID","size":1},{"name":"OwnerID","type":"LLUUID","size":1},{"name":"GroupID","type":"LLUUID","size":1},{"name":"BaseMask","type":"U32","size":1},{"name":"OwnerMask","type":"U32","size":1},{"name":"GroupMask","type":"U32","size":1},{"name":"EveryoneMask","type":"U32","size":1},{"name":"NextOwnerMask","type":"U32","size":1},{"name":"GroupOwned","type":"BOOL","size":1},{"name":"AssetID","type":"LLUUID","size":1},{"name":"Type","type":"S8","size":1},{"name":"InvType","type":"S8","size":1},{"name":"Flags","type":"U32","size":1},{"name":"SaleType","type":"U8","size":1},{"name":"SalePrice","type":"S32","size":1},{"name":"Name","type":"Variable","size":"1"},{"name":"Description","type":"Variable","size":"1"},{"name":"CreationDate","type":"S32","size":1},{"name":"CRC","type":"U32","size":1}]}]},{"name":"RequestInventoryAsset","frequency":"Low","id":"282","flags":["Trusted","Unencoded"],"blocks":[{"name":"QueryData","type":"Single","count":1,"params":[{"name":"QueryID","type":"LLUUID","size":1},{"name":"AgentID","type":"LLUUID","size":1},{"name":"OwnerID","type":"LLUUID","size":1},{"name":"ItemID","type":"LLUUID","size":1}]}]},{"name":"InventoryAssetResponse","frequency":"Low","id":"283","flags":["Trusted","Unencoded"],"blocks":[{"name":"QueryData","type":"Single","count":1,"params":[{"name":"QueryID","type":"LLUUID","size":1},{"name":"AssetID","type":"LLUUID","size":1},{"name":"IsReadable","type":"BOOL","size":1}]}]},{"name":"RemoveInventoryObjects","frequency":"Low","id":"284","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"FolderData","type":"Variable","count":1,"params":[{"name":"FolderID","type":"LLUUID","size":1}]},{"name":"ItemData","type":"Variable","count":1,"params":[{"name":"ItemID","type":"LLUUID","size":1}]}]},{"name":"PurgeInventoryDescendents","frequency":"Low","id":"285","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"InventoryData","type":"Single","count":1,"params":[{"name":"FolderID","type":"LLUUID","size":1}]}]},{"name":"UpdateTaskInventory","frequency":"Low","id":"286","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"UpdateData","type":"Single","count":1,"params":[{"name":"LocalID","type":"U32","size":1},{"name":"Key","type":"U8","size":1}]},{"name":"InventoryData","type":"Single","count":1,"params":[{"name":"ItemID","type":"LLUUID","size":1},{"name":"FolderID","type":"LLUUID","size":1},{"name":"CreatorID","type":"LLUUID","size":1},{"name":"OwnerID","type":"LLUUID","size":1},{"name":"GroupID","type":"LLUUID","size":1},{"name":"BaseMask","type":"U32","size":1},{"name":"OwnerMask","type":"U32","size":1},{"name":"GroupMask","type":"U32","size":1},{"name":"EveryoneMask","type":"U32","size":1},{"name":"NextOwnerMask","type":"U32","size":1},{"name":"GroupOwned","type":"BOOL","size":1},{"name":"TransactionID","type":"LLUUID","size":1},{"name":"Type","type":"S8","size":1},{"name":"InvType","type":"S8","size":1},{"name":"Flags","type":"U32","size":1},{"name":"SaleType","type":"U8","size":1},{"name":"SalePrice","type":"S32","size":1},{"name":"Name","type":"Variable","size":"1"},{"name":"Description","type":"Variable","size":"1"},{"name":"CreationDate","type":"S32","size":1},{"name":"CRC","type":"U32","size":1}]}]},{"name":"RemoveTaskInventory","frequency":"Low","id":"287","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"InventoryData","type":"Single","count":1,"params":[{"name":"LocalID","type":"U32","size":1},{"name":"ItemID","type":"LLUUID","size":1}]}]},{"name":"MoveTaskInventory","frequency":"Low","id":"288","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"FolderID","type":"LLUUID","size":1}]},{"name":"InventoryData","type":"Single","count":1,"params":[{"name":"LocalID","type":"U32","size":1},{"name":"ItemID","type":"LLUUID","size":1}]}]},{"name":"RequestTaskInventory","frequency":"Low","id":"289","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"InventoryData","type":"Single","count":1,"params":[{"name":"LocalID","type":"U32","size":1}]}]},{"name":"ReplyTaskInventory","frequency":"Low","id":"290","flags":["Trusted","Zerocoded"],"blocks":[{"name":"InventoryData","type":"Single","count":1,"params":[{"name":"TaskID","type":"LLUUID","size":1},{"name":"Serial","type":"S16","size":1},{"name":"Filename","type":"Variable","size":"1"}]}]},{"name":"DeRezObject","frequency":"Low","id":"291","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"AgentBlock","type":"Single","count":1,"params":[{"name":"GroupID","type":"LLUUID","size":1},{"name":"Destination","type":"U8","size":1},{"name":"DestinationID","type":"LLUUID","size":1},{"name":"TransactionID","type":"LLUUID","size":1},{"name":"PacketCount","type":"U8","size":1},{"name":"PacketNumber","type":"U8","size":1}]},{"name":"ObjectData","type":"Variable","count":1,"params":[{"name":"ObjectLocalID","type":"U32","size":1}]}]},{"name":"DeRezAck","frequency":"Low","id":"292","flags":["Trusted","Unencoded"],"blocks":[{"name":"TransactionData","type":"Single","count":1,"params":[{"name":"TransactionID","type":"LLUUID","size":1},{"name":"Success","type":"BOOL","size":1}]}]},{"name":"RezObject","frequency":"Low","id":"293","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"GroupID","type":"LLUUID","size":1}]},{"name":"RezData","type":"Single","count":1,"params":[{"name":"FromTaskID","type":"LLUUID","size":1},{"name":"BypassRaycast","type":"U8","size":1},{"name":"RayStart","type":"LLVector3","size":1},{"name":"RayEnd","type":"LLVector3","size":1},{"name":"RayTargetID","type":"LLUUID","size":1},{"name":"RayEndIsIntersection","type":"BOOL","size":1},{"name":"RezSelected","type":"BOOL","size":1},{"name":"RemoveItem","type":"BOOL","size":1},{"name":"ItemFlags","type":"U32","size":1},{"name":"GroupMask","type":"U32","size":1},{"name":"EveryoneMask","type":"U32","size":1},{"name":"NextOwnerMask","type":"U32","size":1}]},{"name":"InventoryData","type":"Single","count":1,"params":[{"name":"ItemID","type":"LLUUID","size":1},{"name":"FolderID","type":"LLUUID","size":1},{"name":"CreatorID","type":"LLUUID","size":1},{"name":"OwnerID","type":"LLUUID","size":1},{"name":"GroupID","type":"LLUUID","size":1},{"name":"BaseMask","type":"U32","size":1},{"name":"OwnerMask","type":"U32","size":1},{"name":"GroupMask","type":"U32","size":1},{"name":"EveryoneMask","type":"U32","size":1},{"name":"NextOwnerMask","type":"U32","size":1},{"name":"GroupOwned","type":"BOOL","size":1},{"name":"TransactionID","type":"LLUUID","size":1},{"name":"Type","type":"S8","size":1},{"name":"InvType","type":"S8","size":1},{"name":"Flags","type":"U32","size":1},{"name":"SaleType","type":"U8","size":1},{"name":"SalePrice","type":"S32","size":1},{"name":"Name","type":"Variable","size":"1"},{"name":"Description","type":"Variable","size":"1"},{"name":"CreationDate","type":"S32","size":1},{"name":"CRC","type":"U32","size":1}]}]},{"name":"RezObjectFromNotecard","frequency":"Low","id":"294","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"GroupID","type":"LLUUID","size":1}]},{"name":"RezData","type":"Single","count":1,"params":[{"name":"FromTaskID","type":"LLUUID","size":1},{"name":"BypassRaycast","type":"U8","size":1},{"name":"RayStart","type":"LLVector3","size":1},{"name":"RayEnd","type":"LLVector3","size":1},{"name":"RayTargetID","type":"LLUUID","size":1},{"name":"RayEndIsIntersection","type":"BOOL","size":1},{"name":"RezSelected","type":"BOOL","size":1},{"name":"RemoveItem","type":"BOOL","size":1},{"name":"ItemFlags","type":"U32","size":1},{"name":"GroupMask","type":"U32","size":1},{"name":"EveryoneMask","type":"U32","size":1},{"name":"NextOwnerMask","type":"U32","size":1}]},{"name":"NotecardData","type":"Single","count":1,"params":[{"name":"NotecardItemID","type":"LLUUID","size":1},{"name":"ObjectID","type":"LLUUID","size":1}]},{"name":"InventoryData","type":"Variable","count":1,"params":[{"name":"ItemID","type":"LLUUID","size":1}]}]},{"name":"TransferInventory","frequency":"Low","id":"295","flags":["Trusted","Zerocoded"],"blocks":[{"name":"InfoBlock","type":"Single","count":1,"params":[{"name":"SourceID","type":"LLUUID","size":1},{"name":"DestID","type":"LLUUID","size":1},{"name":"TransactionID","type":"LLUUID","size":1}]},{"name":"InventoryBlock","type":"Variable","count":1,"params":[{"name":"InventoryID","type":"LLUUID","size":1},{"name":"Type","type":"S8","size":1}]},{"name":"ValidationBlock","type":"Single","count":1,"params":[{"name":"NeedsValidation","type":"BOOL","size":1},{"name":"EstateID","type":"U32","size":1}]}]},{"name":"TransferInventoryAck","frequency":"Low","id":"296","flags":["Trusted","Zerocoded"],"blocks":[{"name":"InfoBlock","type":"Single","count":1,"params":[{"name":"TransactionID","type":"LLUUID","size":1},{"name":"InventoryID","type":"LLUUID","size":1}]}]},{"name":"AcceptFriendship","frequency":"Low","id":"297","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"TransactionBlock","type":"Single","count":1,"params":[{"name":"TransactionID","type":"LLUUID","size":1}]},{"name":"FolderData","type":"Variable","count":1,"params":[{"name":"FolderID","type":"LLUUID","size":1}]}]},{"name":"DeclineFriendship","frequency":"Low","id":"298","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"TransactionBlock","type":"Single","count":1,"params":[{"name":"TransactionID","type":"LLUUID","size":1}]}]},{"name":"FormFriendship","frequency":"Low","id":"299","flags":["Trusted","Unencoded"],"blocks":[{"name":"AgentBlock","type":"Single","count":1,"params":[{"name":"SourceID","type":"LLUUID","size":1},{"name":"DestID","type":"LLUUID","size":1}]}]},{"name":"TerminateFriendship","frequency":"Low","id":"300","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"ExBlock","type":"Single","count":1,"params":[{"name":"OtherID","type":"LLUUID","size":1}]}]},{"name":"OfferCallingCard","frequency":"Low","id":"301","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"AgentBlock","type":"Single","count":1,"params":[{"name":"DestID","type":"LLUUID","size":1},{"name":"TransactionID","type":"LLUUID","size":1}]}]},{"name":"AcceptCallingCard","frequency":"Low","id":"302","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"TransactionBlock","type":"Single","count":1,"params":[{"name":"TransactionID","type":"LLUUID","size":1}]},{"name":"FolderData","type":"Variable","count":1,"params":[{"name":"FolderID","type":"LLUUID","size":1}]}]},{"name":"DeclineCallingCard","frequency":"Low","id":"303","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"TransactionBlock","type":"Single","count":1,"params":[{"name":"TransactionID","type":"LLUUID","size":1}]}]},{"name":"RezScript","frequency":"Low","id":"304","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"GroupID","type":"LLUUID","size":1}]},{"name":"UpdateBlock","type":"Single","count":1,"params":[{"name":"ObjectLocalID","type":"U32","size":1},{"name":"Enabled","type":"BOOL","size":1}]},{"name":"InventoryBlock","type":"Single","count":1,"params":[{"name":"ItemID","type":"LLUUID","size":1},{"name":"FolderID","type":"LLUUID","size":1},{"name":"CreatorID","type":"LLUUID","size":1},{"name":"OwnerID","type":"LLUUID","size":1},{"name":"GroupID","type":"LLUUID","size":1},{"name":"BaseMask","type":"U32","size":1},{"name":"OwnerMask","type":"U32","size":1},{"name":"GroupMask","type":"U32","size":1},{"name":"EveryoneMask","type":"U32","size":1},{"name":"NextOwnerMask","type":"U32","size":1},{"name":"GroupOwned","type":"BOOL","size":1},{"name":"TransactionID","type":"LLUUID","size":1},{"name":"Type","type":"S8","size":1},{"name":"InvType","type":"S8","size":1},{"name":"Flags","type":"U32","size":1},{"name":"SaleType","type":"U8","size":1},{"name":"SalePrice","type":"S32","size":1},{"name":"Name","type":"Variable","size":"1"},{"name":"Description","type":"Variable","size":"1"},{"name":"CreationDate","type":"S32","size":1},{"name":"CRC","type":"U32","size":1}]}]},{"name":"CreateInventoryItem","frequency":"Low","id":"305","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"InventoryBlock","type":"Single","count":1,"params":[{"name":"CallbackID","type":"U32","size":1},{"name":"FolderID","type":"LLUUID","size":1},{"name":"TransactionID","type":"LLUUID","size":1},{"name":"NextOwnerMask","type":"U32","size":1},{"name":"Type","type":"S8","size":1},{"name":"InvType","type":"S8","size":1},{"name":"WearableType","type":"U8","size":1},{"name":"Name","type":"Variable","size":"1"},{"name":"Description","type":"Variable","size":"1"}]}]},{"name":"CreateLandmarkForEvent","frequency":"Low","id":"306","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"EventData","type":"Single","count":1,"params":[{"name":"EventID","type":"U32","size":1}]},{"name":"InventoryBlock","type":"Single","count":1,"params":[{"name":"FolderID","type":"LLUUID","size":1},{"name":"Name","type":"Variable","size":"1"}]}]},{"name":"EventLocationRequest","frequency":"Low","id":"307","flags":["Trusted","Zerocoded"],"blocks":[{"name":"QueryData","type":"Single","count":1,"params":[{"name":"QueryID","type":"LLUUID","size":1}]},{"name":"EventData","type":"Single","count":1,"params":[{"name":"EventID","type":"U32","size":1}]}]},{"name":"EventLocationReply","frequency":"Low","id":"308","flags":["Trusted","Zerocoded"],"blocks":[{"name":"QueryData","type":"Single","count":1,"params":[{"name":"QueryID","type":"LLUUID","size":1}]},{"name":"EventData","type":"Single","count":1,"params":[{"name":"Success","type":"BOOL","size":1},{"name":"RegionID","type":"LLUUID","size":1},{"name":"RegionPos","type":"LLVector3","size":1}]}]},{"name":"RegionHandleRequest","frequency":"Low","id":"309","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"RequestBlock","type":"Single","count":1,"params":[{"name":"RegionID","type":"LLUUID","size":1}]}]},{"name":"RegionIDAndHandleReply","frequency":"Low","id":"310","flags":["Trusted","Unencoded"],"blocks":[{"name":"ReplyBlock","type":"Single","count":1,"params":[{"name":"RegionID","type":"LLUUID","size":1},{"name":"RegionHandle","type":"U64","size":1}]}]},{"name":"MoneyTransferRequest","frequency":"Low","id":"311","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"MoneyData","type":"Single","count":1,"params":[{"name":"SourceID","type":"LLUUID","size":1},{"name":"DestID","type":"LLUUID","size":1},{"name":"Flags","type":"U8","size":1},{"name":"Amount","type":"S32","size":1},{"name":"AggregatePermNextOwner","type":"U8","size":1},{"name":"AggregatePermInventory","type":"U8","size":1},{"name":"TransactionType","type":"S32","size":1},{"name":"Description","type":"Variable","size":"1"}]}]},{"name":"MoneyTransferBackend","frequency":"Low","id":"312","flags":["Trusted","Zerocoded"],"blocks":[{"name":"MoneyData","type":"Single","count":1,"params":[{"name":"TransactionID","type":"LLUUID","size":1},{"name":"TransactionTime","type":"U32","size":1},{"name":"SourceID","type":"LLUUID","size":1},{"name":"DestID","type":"LLUUID","size":1},{"name":"Flags","type":"U8","size":1},{"name":"Amount","type":"S32","size":1},{"name":"AggregatePermNextOwner","type":"U8","size":1},{"name":"AggregatePermInventory","type":"U8","size":1},{"name":"TransactionType","type":"S32","size":1},{"name":"RegionID","type":"LLUUID","size":1},{"name":"GridX","type":"U32","size":1},{"name":"GridY","type":"U32","size":1},{"name":"Description","type":"Variable","size":"1"}]}]},{"name":"MoneyBalanceRequest","frequency":"Low","id":"313","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"MoneyData","type":"Single","count":1,"params":[{"name":"TransactionID","type":"LLUUID","size":1}]}]},{"name":"MoneyBalanceReply","frequency":"Low","id":"314","flags":["Trusted","Zerocoded"],"blocks":[{"name":"MoneyData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"TransactionID","type":"LLUUID","size":1},{"name":"TransactionSuccess","type":"BOOL","size":1},{"name":"MoneyBalance","type":"S32","size":1},{"name":"SquareMetersCredit","type":"S32","size":1},{"name":"SquareMetersCommitted","type":"S32","size":1},{"name":"Description","type":"Variable","size":"1"}]},{"name":"TransactionInfo","type":"Single","count":1,"params":[{"name":"TransactionType","type":"S32","size":1},{"name":"SourceID","type":"LLUUID","size":1},{"name":"IsSourceGroup","type":"BOOL","size":1},{"name":"DestID","type":"LLUUID","size":1},{"name":"IsDestGroup","type":"BOOL","size":1},{"name":"Amount","type":"S32","size":1},{"name":"ItemDescription","type":"Variable","size":"1"}]}]},{"name":"RoutedMoneyBalanceReply","frequency":"Low","id":"315","flags":["Trusted","Zerocoded","UDPDeprecated"],"blocks":[{"name":"TargetBlock","type":"Single","count":1,"params":[{"name":"TargetIP","type":"IPADDR","size":1},{"name":"TargetPort","type":"IPPORT","size":1}]},{"name":"MoneyData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"TransactionID","type":"LLUUID","size":1},{"name":"TransactionSuccess","type":"BOOL","size":1},{"name":"MoneyBalance","type":"S32","size":1},{"name":"SquareMetersCredit","type":"S32","size":1},{"name":"SquareMetersCommitted","type":"S32","size":1},{"name":"Description","type":"Variable","size":"1"}]},{"name":"TransactionInfo","type":"Single","count":1,"params":[{"name":"TransactionType","type":"S32","size":1},{"name":"SourceID","type":"LLUUID","size":1},{"name":"IsSourceGroup","type":"BOOL","size":1},{"name":"DestID","type":"LLUUID","size":1},{"name":"IsDestGroup","type":"BOOL","size":1},{"name":"Amount","type":"S32","size":1},{"name":"ItemDescription","type":"Variable","size":"1"}]}]},{"name":"ActivateGestures","frequency":"Low","id":"316","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"Flags","type":"U32","size":1}]},{"name":"Data","type":"Variable","count":1,"params":[{"name":"ItemID","type":"LLUUID","size":1},{"name":"AssetID","type":"LLUUID","size":1},{"name":"GestureFlags","type":"U32","size":1}]}]},{"name":"DeactivateGestures","frequency":"Low","id":"317","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"Flags","type":"U32","size":1}]},{"name":"Data","type":"Variable","count":1,"params":[{"name":"ItemID","type":"LLUUID","size":1},{"name":"GestureFlags","type":"U32","size":1}]}]},{"name":"//","frequency":"InventoryUpdate","id":"Low","flags":["Trusted","Unencoded//"],"blocks":[{"name":"//","type":"AgentData","count":"Single//","params":[{"name":"AgentID","type":"LLUUID","size":1}]},{"name":"//","type":"InventoryData","count":"Single//","params":[{"name":"IsComplete","type":"U8","size":1},{"name":"Filename","type":"Variable","size":"1"}]}]},{"name":"MuteListUpdate","frequency":"Low","id":"318","flags":["Trusted","Unencoded"],"blocks":[{"name":"MuteData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"Filename","type":"Variable","size":"1"}]}]},{"name":"UseCachedMuteList","frequency":"Low","id":"319","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1}]}]},{"name":"GrantUserRights","frequency":"Low","id":"320","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"Rights","type":"Variable","count":1,"params":[{"name":"AgentRelated","type":"LLUUID","size":1},{"name":"RelatedRights","type":"S32","size":1}]}]},{"name":"ChangeUserRights","frequency":"Low","id":"321","flags":["Trusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1}]},{"name":"Rights","type":"Variable","count":1,"params":[{"name":"AgentRelated","type":"LLUUID","size":1},{"name":"RelatedRights","type":"S32","size":1}]}]},{"name":"OnlineNotification","frequency":"Low","id":"322","flags":["Trusted","Unencoded"],"blocks":[{"name":"AgentBlock","type":"Variable","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1}]}]},{"name":"OfflineNotification","frequency":"Low","id":"323","flags":["Trusted","Unencoded"],"blocks":[{"name":"AgentBlock","type":"Variable","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1}]}]},{"name":"SetStartLocationRequest","frequency":"Low","id":"324","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"StartLocationData","type":"Single","count":1,"params":[{"name":"SimName","type":"Variable","size":"1"},{"name":"LocationID","type":"U32","size":1},{"name":"LocationPos","type":"LLVector3","size":1},{"name":"LocationLookAt","type":"LLVector3","size":1}]}]},{"name":"SetStartLocation","frequency":"Low","id":"325","flags":["Trusted","Zerocoded"],"blocks":[{"name":"StartLocationData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"RegionID","type":"LLUUID","size":1},{"name":"LocationID","type":"U32","size":1},{"name":"RegionHandle","type":"U64","size":1},{"name":"LocationPos","type":"LLVector3","size":1},{"name":"LocationLookAt","type":"LLVector3","size":1}]}]},{"name":"NetTest","frequency":"Low","id":"326","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"NetBlock","type":"Single","count":1,"params":[{"name":"Port","type":"IPPORT","size":1}]}]},{"name":"SetCPURatio","frequency":"Low","id":"327","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"Data","type":"Single","count":1,"params":[{"name":"Ratio","type":"U8","size":1}]}]},{"name":"SimCrashed","frequency":"Low","id":"328","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"Data","type":"Single","count":1,"params":[{"name":"RegionX","type":"U32","size":1},{"name":"RegionY","type":"U32","size":1}]},{"name":"Users","type":"Variable","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1}]}]},{"name":"NameValuePair","frequency":"Low","id":"329","flags":["Trusted","Unencoded"],"blocks":[{"name":"TaskData","type":"Single","count":1,"params":[{"name":"ID","type":"LLUUID","size":1}]},{"name":"NameValueData","type":"Variable","count":1,"params":[{"name":"NVPair","type":"Variable","size":"2"}]}]},{"name":"RemoveNameValuePair","frequency":"Low","id":"330","flags":["Trusted","Unencoded"],"blocks":[{"name":"TaskData","type":"Single","count":1,"params":[{"name":"ID","type":"LLUUID","size":1}]},{"name":"NameValueData","type":"Variable","count":1,"params":[{"name":"NVPair","type":"Variable","size":"2"}]}]},{"name":"UpdateAttachment","frequency":"Low","id":"331","flags":["Trusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"AttachmentBlock","type":"Single","count":1,"params":[{"name":"AttachmentPoint","type":"U8","size":1}]},{"name":"OperationData","type":"Single","count":1,"params":[{"name":"AddItem","type":"BOOL","size":1},{"name":"UseExistingAsset","type":"BOOL","size":1}]},{"name":"InventoryData","type":"Single","count":"//","params":[{"name":"ItemID","type":"LLUUID","size":1},{"name":"FolderID","type":"LLUUID","size":1},{"name":"CreatorID","type":"LLUUID","size":1},{"name":"OwnerID","type":"LLUUID","size":1},{"name":"GroupID","type":"LLUUID","size":1},{"name":"BaseMask","type":"U32","size":1},{"name":"OwnerMask","type":"U32","size":1},{"name":"GroupMask","type":"U32","size":1},{"name":"EveryoneMask","type":"U32","size":1},{"name":"NextOwnerMask","type":"U32","size":1},{"name":"GroupOwned","type":"BOOL","size":1},{"name":"AssetID","type":"LLUUID","size":1},{"name":"Type","type":"S8","size":1},{"name":"InvType","type":"S8","size":1},{"name":"Flags","type":"U32","size":1},{"name":"SaleType","type":"U8","size":1},{"name":"SalePrice","type":"S32","size":1},{"name":"Name","type":"Variable","size":"1"},{"name":"Description","type":"Variable","size":"1"},{"name":"CreationDate","type":"S32","size":1},{"name":"CRC","type":"U32","size":1}]}]},{"name":"RemoveAttachment","frequency":"Low","id":"332","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"AttachmentBlock","type":"Single","count":1,"params":[{"name":"AttachmentPoint","type":"U8","size":1},{"name":"ItemID","type":"LLUUID","size":1}]}]},{"name":"SoundTrigger","frequency":"High","id":"29","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"SoundData","type":"Single","count":1,"params":[{"name":"SoundID","type":"LLUUID","size":1},{"name":"OwnerID","type":"LLUUID","size":1},{"name":"ObjectID","type":"LLUUID","size":1},{"name":"ParentID","type":"LLUUID","size":1},{"name":"Handle","type":"U64","size":1},{"name":"Position","type":"LLVector3","size":1},{"name":"Gain","type":"F32","size":1}]}]},{"name":"AttachedSound","frequency":"Medium","id":"13","flags":["Trusted","Unencoded"],"blocks":[{"name":"DataBlock","type":"Single","count":1,"params":[{"name":"SoundID","type":"LLUUID","size":1},{"name":"ObjectID","type":"LLUUID","size":1},{"name":"OwnerID","type":"LLUUID","size":1},{"name":"Gain","type":"F32","size":1},{"name":"Flags","type":"U8","size":1}]}]},{"name":"AttachedSoundGainChange","frequency":"Medium","id":"14","flags":["Trusted","Unencoded"],"blocks":[{"name":"DataBlock","type":"Single","count":1,"params":[{"name":"ObjectID","type":"LLUUID","size":1},{"name":"Gain","type":"F32","size":1}]}]},{"name":"PreloadSound","frequency":"Medium","id":"15","flags":["Trusted","Unencoded"],"blocks":[{"name":"DataBlock","type":"Variable","count":1,"params":[{"name":"ObjectID","type":"LLUUID","size":1},{"name":"OwnerID","type":"LLUUID","size":1},{"name":"SoundID","type":"LLUUID","size":1}]}]},{"name":"AssetUploadRequest","frequency":"Low","id":"333","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AssetBlock","type":"Single","count":1,"params":[{"name":"TransactionID","type":"LLUUID","size":1},{"name":"Type","type":"S8","size":1},{"name":"Tempfile","type":"BOOL","size":1},{"name":"StoreLocal","type":"BOOL","size":1},{"name":"AssetData","type":"Variable","size":"2"}]}]},{"name":"AssetUploadComplete","frequency":"Low","id":"334","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AssetBlock","type":"Single","count":1,"params":[{"name":"UUID","type":"LLUUID","size":1},{"name":"Type","type":"S8","size":1},{"name":"Success","type":"BOOL","size":1}]}]},{"name":"EmailMessageRequest","frequency":"Low","id":"335","flags":["Trusted","Unencoded"],"blocks":[{"name":"DataBlock","type":"Single","count":1,"params":[{"name":"ObjectID","type":"LLUUID","size":1},{"name":"FromAddress","type":"Variable","size":"1"},{"name":"Subject","type":"Variable","size":"1"}]}]},{"name":"EmailMessageReply","frequency":"Low","id":"336","flags":["Trusted","Unencoded"],"blocks":[{"name":"DataBlock","type":"Single","count":1,"params":[{"name":"ObjectID","type":"LLUUID","size":1},{"name":"More","type":"U32","size":1},{"name":"Time","type":"U32","size":1},{"name":"FromAddress","type":"Variable","size":"1"},{"name":"Subject","type":"Variable","size":"1"},{"name":"Data","type":"Variable","size":"2"},{"name":"MailFilter","type":"Variable","size":"1"}]}]},{"name":"InternalScriptMail","frequency":"Medium","id":"16","flags":["Trusted","Unencoded"],"blocks":[{"name":"DataBlock","type":"Single","count":1,"params":[{"name":"From","type":"Variable","size":"1"},{"name":"To","type":"LLUUID","size":1},{"name":"Subject","type":"Variable","size":"1"},{"name":"Body","type":"Variable","size":"2"}]}]},{"name":"ScriptDataRequest","frequency":"Low","id":"337","flags":["Trusted","Unencoded"],"blocks":[{"name":"DataBlock","type":"Variable","count":1,"params":[{"name":"Hash","type":"U64","size":1},{"name":"RequestType","type":"S8","size":1},{"name":"Request","type":"Variable","size":"2"}]}]},{"name":"ScriptDataReply","frequency":"Low","id":"338","flags":["Trusted","Unencoded"],"blocks":[{"name":"DataBlock","type":"Variable","count":1,"params":[{"name":"Hash","type":"U64","size":1},{"name":"Reply","type":"Variable","size":"2"}]}]},{"name":"CreateGroupRequest","frequency":"Low","id":"339","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"GroupData","type":"Single","count":1,"params":[{"name":"Name","type":"Variable","size":"1"},{"name":"Charter","type":"Variable","size":"2"},{"name":"ShowInList","type":"BOOL","size":1},{"name":"InsigniaID","type":"LLUUID","size":1},{"name":"MembershipFee","type":"S32","size":1},{"name":"OpenEnrollment","type":"BOOL","size":1},{"name":"AllowPublish","type":"BOOL","size":1},{"name":"MaturePublish","type":"BOOL","size":1}]}]},{"name":"CreateGroupReply","frequency":"Low","id":"340","flags":["Trusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1}]},{"name":"ReplyData","type":"Single","count":1,"params":[{"name":"GroupID","type":"LLUUID","size":1},{"name":"Success","type":"BOOL","size":1},{"name":"Message","type":"Variable","size":"1"}]}]},{"name":"UpdateGroupInfo","frequency":"Low","id":"341","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"GroupData","type":"Single","count":1,"params":[{"name":"GroupID","type":"LLUUID","size":1},{"name":"Charter","type":"Variable","size":"2"},{"name":"ShowInList","type":"BOOL","size":1},{"name":"InsigniaID","type":"LLUUID","size":1},{"name":"MembershipFee","type":"S32","size":1},{"name":"OpenEnrollment","type":"BOOL","size":1},{"name":"AllowPublish","type":"BOOL","size":1},{"name":"MaturePublish","type":"BOOL","size":1}]}]},{"name":"GroupRoleChanges","frequency":"Low","id":"342","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"GroupID","type":"LLUUID","size":1}]},{"name":"RoleChange","type":"Variable","count":1,"params":[{"name":"RoleID","type":"LLUUID","size":1},{"name":"MemberID","type":"LLUUID","size":1},{"name":"Change","type":"U32","size":1}]}]},{"name":"JoinGroupRequest","frequency":"Low","id":"343","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"GroupData","type":"Single","count":1,"params":[{"name":"GroupID","type":"LLUUID","size":1}]}]},{"name":"JoinGroupReply","frequency":"Low","id":"344","flags":["Trusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1}]},{"name":"GroupData","type":"Single","count":1,"params":[{"name":"GroupID","type":"LLUUID","size":1},{"name":"Success","type":"BOOL","size":1}]}]},{"name":"EjectGroupMemberRequest","frequency":"Low","id":"345","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"GroupData","type":"Single","count":1,"params":[{"name":"GroupID","type":"LLUUID","size":1}]},{"name":"EjectData","type":"Variable","count":1,"params":[{"name":"EjecteeID","type":"LLUUID","size":1}]}]},{"name":"EjectGroupMemberReply","frequency":"Low","id":"346","flags":["Trusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1}]},{"name":"GroupData","type":"Single","count":1,"params":[{"name":"GroupID","type":"LLUUID","size":1}]},{"name":"EjectData","type":"Single","count":1,"params":[{"name":"Success","type":"BOOL","size":1}]}]},{"name":"LeaveGroupRequest","frequency":"Low","id":"347","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"GroupData","type":"Single","count":1,"params":[{"name":"GroupID","type":"LLUUID","size":1}]}]},{"name":"LeaveGroupReply","frequency":"Low","id":"348","flags":["Trusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1}]},{"name":"GroupData","type":"Single","count":1,"params":[{"name":"GroupID","type":"LLUUID","size":1},{"name":"Success","type":"BOOL","size":1}]}]},{"name":"InviteGroupRequest","frequency":"Low","id":"349","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"GroupData","type":"Single","count":1,"params":[{"name":"GroupID","type":"LLUUID","size":1}]},{"name":"InviteData","type":"Variable","count":1,"params":[{"name":"InviteeID","type":"LLUUID","size":1},{"name":"RoleID","type":"LLUUID","size":1}]}]},{"name":"InviteGroupResponse","frequency":"Low","id":"350","flags":["Trusted","Unencoded"],"blocks":[{"name":"InviteData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"InviteeID","type":"LLUUID","size":1},{"name":"GroupID","type":"LLUUID","size":1},{"name":"RoleID","type":"LLUUID","size":1},{"name":"MembershipFee","type":"S32","size":1}]},{"name":"GroupData","type":"Single","count":1,"params":[{"name":"GroupLimit","type":"S32","size":1}]}]},{"name":"GroupProfileRequest","frequency":"Low","id":"351","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"GroupData","type":"Single","count":1,"params":[{"name":"GroupID","type":"LLUUID","size":1}]}]},{"name":"GroupProfileReply","frequency":"Low","id":"352","flags":["Trusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1}]},{"name":"GroupData","type":"Single","count":1,"params":[{"name":"GroupID","type":"LLUUID","size":1},{"name":"Name","type":"Variable","size":"1"},{"name":"Charter","type":"Variable","size":"2"},{"name":"ShowInList","type":"BOOL","size":1},{"name":"MemberTitle","type":"Variable","size":"1"},{"name":"PowersMask","type":"U64","size":1},{"name":"InsigniaID","type":"LLUUID","size":1},{"name":"FounderID","type":"LLUUID","size":1},{"name":"MembershipFee","type":"S32","size":1},{"name":"OpenEnrollment","type":"BOOL","size":1},{"name":"Money","type":"S32","size":1},{"name":"GroupMembershipCount","type":"S32","size":1},{"name":"GroupRolesCount","type":"S32","size":1},{"name":"AllowPublish","type":"BOOL","size":1},{"name":"MaturePublish","type":"BOOL","size":1},{"name":"OwnerRole","type":"LLUUID","size":1}]}]},{"name":"GroupAccountSummaryRequest","frequency":"Low","id":"353","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"GroupID","type":"LLUUID","size":1}]},{"name":"MoneyData","type":"Single","count":1,"params":[{"name":"RequestID","type":"LLUUID","size":1},{"name":"IntervalDays","type":"S32","size":1},{"name":"CurrentInterval","type":"S32","size":1}]}]},{"name":"GroupAccountSummaryReply","frequency":"Low","id":"354","flags":["Trusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"GroupID","type":"LLUUID","size":1}]},{"name":"MoneyData","type":"Single","count":1,"params":[{"name":"RequestID","type":"LLUUID","size":1},{"name":"IntervalDays","type":"S32","size":1},{"name":"CurrentInterval","type":"S32","size":1},{"name":"StartDate","type":"Variable","size":"1"},{"name":"Balance","type":"S32","size":1},{"name":"TotalCredits","type":"S32","size":1},{"name":"TotalDebits","type":"S32","size":1},{"name":"ObjectTaxCurrent","type":"S32","size":1},{"name":"LightTaxCurrent","type":"S32","size":1},{"name":"LandTaxCurrent","type":"S32","size":1},{"name":"GroupTaxCurrent","type":"S32","size":1},{"name":"ParcelDirFeeCurrent","type":"S32","size":1},{"name":"ObjectTaxEstimate","type":"S32","size":1},{"name":"LightTaxEstimate","type":"S32","size":1},{"name":"LandTaxEstimate","type":"S32","size":1},{"name":"GroupTaxEstimate","type":"S32","size":1},{"name":"ParcelDirFeeEstimate","type":"S32","size":1},{"name":"NonExemptMembers","type":"S32","size":1},{"name":"LastTaxDate","type":"Variable","size":"1"},{"name":"TaxDate","type":"Variable","size":"1"}]}]},{"name":"GroupAccountDetailsRequest","frequency":"Low","id":"355","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"GroupID","type":"LLUUID","size":1}]},{"name":"MoneyData","type":"Single","count":1,"params":[{"name":"RequestID","type":"LLUUID","size":1},{"name":"IntervalDays","type":"S32","size":1},{"name":"CurrentInterval","type":"S32","size":1}]}]},{"name":"GroupAccountDetailsReply","frequency":"Low","id":"356","flags":["Trusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"GroupID","type":"LLUUID","size":1}]},{"name":"MoneyData","type":"Single","count":1,"params":[{"name":"RequestID","type":"LLUUID","size":1},{"name":"IntervalDays","type":"S32","size":1},{"name":"CurrentInterval","type":"S32","size":1},{"name":"StartDate","type":"Variable","size":"1"}]},{"name":"HistoryData","type":"Variable","count":1,"params":[{"name":"Description","type":"Variable","size":"1"},{"name":"Amount","type":"S32","size":1}]}]},{"name":"GroupAccountTransactionsRequest","frequency":"Low","id":"357","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"GroupID","type":"LLUUID","size":1}]},{"name":"MoneyData","type":"Single","count":1,"params":[{"name":"RequestID","type":"LLUUID","size":1},{"name":"IntervalDays","type":"S32","size":1},{"name":"CurrentInterval","type":"S32","size":1}]}]},{"name":"GroupAccountTransactionsReply","frequency":"Low","id":"358","flags":["Trusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"GroupID","type":"LLUUID","size":1}]},{"name":"MoneyData","type":"Single","count":1,"params":[{"name":"RequestID","type":"LLUUID","size":1},{"name":"IntervalDays","type":"S32","size":1},{"name":"CurrentInterval","type":"S32","size":1},{"name":"StartDate","type":"Variable","size":"1"}]},{"name":"HistoryData","type":"Variable","count":1,"params":[{"name":"Time","type":"Variable","size":"1"},{"name":"User","type":"Variable","size":"1"},{"name":"Type","type":"S32","size":1},{"name":"Item","type":"Variable","size":"1"},{"name":"Amount","type":"S32","size":1}]}]},{"name":"GroupActiveProposalsRequest","frequency":"Low","id":"359","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"GroupData","type":"Single","count":1,"params":[{"name":"GroupID","type":"LLUUID","size":1}]},{"name":"TransactionData","type":"Single","count":1,"params":[{"name":"TransactionID","type":"LLUUID","size":1}]}]},{"name":"GroupActiveProposalItemReply","frequency":"Low","id":"360","flags":["Trusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"GroupID","type":"LLUUID","size":1}]},{"name":"TransactionData","type":"Single","count":1,"params":[{"name":"TransactionID","type":"LLUUID","size":1},{"name":"TotalNumItems","type":"U32","size":1}]},{"name":"ProposalData","type":"Variable","count":1,"params":[{"name":"VoteID","type":"LLUUID","size":1},{"name":"VoteInitiator","type":"LLUUID","size":1},{"name":"TerseDateID","type":"Variable","size":"1"},{"name":"StartDateTime","type":"Variable","size":"1"},{"name":"EndDateTime","type":"Variable","size":"1"},{"name":"AlreadyVoted","type":"BOOL","size":1},{"name":"VoteCast","type":"Variable","size":"1"},{"name":"Majority","type":"F32","size":1},{"name":"Quorum","type":"S32","size":1},{"name":"ProposalText","type":"Variable","size":"1"}]}]},{"name":"GroupVoteHistoryRequest","frequency":"Low","id":"361","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"GroupData","type":"Single","count":1,"params":[{"name":"GroupID","type":"LLUUID","size":1}]},{"name":"TransactionData","type":"Single","count":1,"params":[{"name":"TransactionID","type":"LLUUID","size":1}]}]},{"name":"GroupVoteHistoryItemReply","frequency":"Low","id":"362","flags":["Trusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"GroupID","type":"LLUUID","size":1}]},{"name":"TransactionData","type":"Single","count":1,"params":[{"name":"TransactionID","type":"LLUUID","size":1},{"name":"TotalNumItems","type":"U32","size":1}]},{"name":"HistoryItemData","type":"Single","count":1,"params":[{"name":"VoteID","type":"LLUUID","size":1},{"name":"TerseDateID","type":"Variable","size":"1"},{"name":"StartDateTime","type":"Variable","size":"1"},{"name":"EndDateTime","type":"Variable","size":"1"},{"name":"VoteInitiator","type":"LLUUID","size":1},{"name":"VoteType","type":"Variable","size":"1"},{"name":"VoteResult","type":"Variable","size":"1"},{"name":"Majority","type":"F32","size":1},{"name":"Quorum","type":"S32","size":1},{"name":"ProposalText","type":"Variable","size":"2"}]},{"name":"VoteItem","type":"Variable","count":1,"params":[{"name":"CandidateID","type":"LLUUID","size":1},{"name":"VoteCast","type":"Variable","size":"1"},{"name":"NumVotes","type":"S32","size":1}]}]},{"name":"StartGroupProposal","frequency":"Low","id":"363","flags":["NotTrusted","Zerocoded","UDPDeprecated"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"ProposalData","type":"Single","count":1,"params":[{"name":"GroupID","type":"LLUUID","size":1},{"name":"Quorum","type":"S32","size":1},{"name":"Majority","type":"F32","size":1},{"name":"Duration","type":"S32","size":1},{"name":"ProposalText","type":"Variable","size":"1"}]}]},{"name":"GroupProposalBallot","frequency":"Low","id":"364","flags":["NotTrusted","Unencoded","UDPDeprecated"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"ProposalData","type":"Single","count":1,"params":[{"name":"ProposalID","type":"LLUUID","size":1},{"name":"GroupID","type":"LLUUID","size":1},{"name":"VoteCast","type":"Variable","size":"1"}]}]},{"name":"TallyVotes","frequency":"Low","id":"365","flags":["Trusted","Unencoded"],"blocks":[]},{"name":"GroupMembersRequest","frequency":"Low","id":"366","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"GroupData","type":"Single","count":1,"params":[{"name":"GroupID","type":"LLUUID","size":1},{"name":"RequestID","type":"LLUUID","size":1}]}]},{"name":"GroupMembersReply","frequency":"Low","id":"367","flags":["Trusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1}]},{"name":"GroupData","type":"Single","count":1,"params":[{"name":"GroupID","type":"LLUUID","size":1},{"name":"RequestID","type":"LLUUID","size":1},{"name":"MemberCount","type":"S32","size":1}]},{"name":"MemberData","type":"Variable","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"Contribution","type":"S32","size":1},{"name":"OnlineStatus","type":"Variable","size":"1"},{"name":"AgentPowers","type":"U64","size":1},{"name":"Title","type":"Variable","size":"1"},{"name":"IsOwner","type":"BOOL","size":1}]}]},{"name":"ActivateGroup","frequency":"Low","id":"368","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"GroupID","type":"LLUUID","size":1}]}]},{"name":"SetGroupContribution","frequency":"Low","id":"369","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"Data","type":"Single","count":1,"params":[{"name":"GroupID","type":"LLUUID","size":1},{"name":"Contribution","type":"S32","size":1}]}]},{"name":"SetGroupAcceptNotices","frequency":"Low","id":"370","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"Data","type":"Single","count":1,"params":[{"name":"GroupID","type":"LLUUID","size":1},{"name":"AcceptNotices","type":"BOOL","size":1}]},{"name":"NewData","type":"Single","count":1,"params":[{"name":"ListInProfile","type":"BOOL","size":1}]}]},{"name":"GroupRoleDataRequest","frequency":"Low","id":"371","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"GroupData","type":"Single","count":1,"params":[{"name":"GroupID","type":"LLUUID","size":1},{"name":"RequestID","type":"LLUUID","size":1}]}]},{"name":"GroupRoleDataReply","frequency":"Low","id":"372","flags":["Trusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1}]},{"name":"GroupData","type":"Single","count":1,"params":[{"name":"GroupID","type":"LLUUID","size":1},{"name":"RequestID","type":"LLUUID","size":1},{"name":"RoleCount","type":"S32","size":1}]},{"name":"RoleData","type":"Variable","count":1,"params":[{"name":"RoleID","type":"LLUUID","size":1},{"name":"Name","type":"Variable","size":"1"},{"name":"Title","type":"Variable","size":"1"},{"name":"Description","type":"Variable","size":"1"},{"name":"Powers","type":"U64","size":1},{"name":"Members","type":"U32","size":1}]}]},{"name":"GroupRoleMembersRequest","frequency":"Low","id":"373","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"GroupData","type":"Single","count":1,"params":[{"name":"GroupID","type":"LLUUID","size":1},{"name":"RequestID","type":"LLUUID","size":1}]}]},{"name":"GroupRoleMembersReply","frequency":"Low","id":"374","flags":["Trusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"GroupID","type":"LLUUID","size":1},{"name":"RequestID","type":"LLUUID","size":1},{"name":"TotalPairs","type":"U32","size":1}]},{"name":"MemberData","type":"Variable","count":1,"params":[{"name":"RoleID","type":"LLUUID","size":1},{"name":"MemberID","type":"LLUUID","size":1}]}]},{"name":"GroupTitlesRequest","frequency":"Low","id":"375","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"GroupID","type":"LLUUID","size":1},{"name":"RequestID","type":"LLUUID","size":1}]}]},{"name":"GroupTitlesReply","frequency":"Low","id":"376","flags":["Trusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"GroupID","type":"LLUUID","size":1},{"name":"RequestID","type":"LLUUID","size":1}]},{"name":"GroupData","type":"Variable","count":1,"params":[{"name":"Title","type":"Variable","size":"1"},{"name":"RoleID","type":"LLUUID","size":1},{"name":"Selected","type":"BOOL","size":1}]}]},{"name":"GroupTitleUpdate","frequency":"Low","id":"377","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"GroupID","type":"LLUUID","size":1},{"name":"TitleRoleID","type":"LLUUID","size":1}]}]},{"name":"GroupRoleUpdate","frequency":"Low","id":"378","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"GroupID","type":"LLUUID","size":1}]},{"name":"RoleData","type":"Variable","count":1,"params":[{"name":"RoleID","type":"LLUUID","size":1},{"name":"Name","type":"Variable","size":"1"},{"name":"Description","type":"Variable","size":"1"},{"name":"Title","type":"Variable","size":"1"},{"name":"Powers","type":"U64","size":1},{"name":"UpdateType","type":"U8","size":1}]}]},{"name":"LiveHelpGroupRequest","frequency":"Low","id":"379","flags":["Trusted","Unencoded"],"blocks":[{"name":"RequestData","type":"Single","count":1,"params":[{"name":"RequestID","type":"LLUUID","size":1},{"name":"AgentID","type":"LLUUID","size":1}]}]},{"name":"LiveHelpGroupReply","frequency":"Low","id":"380","flags":["Trusted","Unencoded"],"blocks":[{"name":"ReplyData","type":"Single","count":1,"params":[{"name":"RequestID","type":"LLUUID","size":1},{"name":"GroupID","type":"LLUUID","size":1},{"name":"Selection","type":"Variable","size":"1"}]}]},{"name":"AgentWearablesRequest","frequency":"Low","id":"381","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]}]},{"name":"AgentWearablesUpdate","frequency":"Low","id":"382","flags":["Trusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"SerialNum","type":"U32","size":1}]},{"name":"WearableData","type":"Variable","count":1,"params":[{"name":"ItemID","type":"LLUUID","size":1},{"name":"AssetID","type":"LLUUID","size":1},{"name":"WearableType","type":"U8","size":1}]}]},{"name":"AgentIsNowWearing","frequency":"Low","id":"383","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"WearableData","type":"Variable","count":1,"params":[{"name":"ItemID","type":"LLUUID","size":1},{"name":"WearableType","type":"U8","size":1}]}]},{"name":"AgentCachedTexture","frequency":"Low","id":"384","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"SerialNum","type":"S32","size":1}]},{"name":"WearableData","type":"Variable","count":1,"params":[{"name":"ID","type":"LLUUID","size":1},{"name":"TextureIndex","type":"U8","size":1}]}]},{"name":"AgentCachedTextureResponse","frequency":"Low","id":"385","flags":["Trusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"SerialNum","type":"S32","size":1}]},{"name":"WearableData","type":"Variable","count":1,"params":[{"name":"TextureID","type":"LLUUID","size":1},{"name":"TextureIndex","type":"U8","size":1},{"name":"HostName","type":"Variable","size":"1"}]}]},{"name":"AgentDataUpdateRequest","frequency":"Low","id":"386","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]}]},{"name":"AgentDataUpdate","frequency":"Low","id":"387","flags":["Trusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"FirstName","type":"Variable","size":"1"},{"name":"LastName","type":"Variable","size":"1"},{"name":"GroupTitle","type":"Variable","size":"1"},{"name":"ActiveGroupID","type":"LLUUID","size":1},{"name":"GroupPowers","type":"U64","size":1},{"name":"GroupName","type":"Variable","size":"1"}]}]},{"name":"GroupDataUpdate","frequency":"Low","id":"388","flags":["Trusted","Zerocoded"],"blocks":[{"name":"AgentGroupData","type":"Variable","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"GroupID","type":"LLUUID","size":1},{"name":"AgentPowers","type":"U64","size":1},{"name":"GroupTitle","type":"Variable","size":"1"}]}]},{"name":"AgentGroupDataUpdate","frequency":"Low","id":"389","flags":["Trusted","Zerocoded","UDPDeprecated"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1}]},{"name":"GroupData","type":"Variable","count":1,"params":[{"name":"GroupID","type":"LLUUID","size":1},{"name":"GroupPowers","type":"U64","size":1},{"name":"AcceptNotices","type":"BOOL","size":1},{"name":"GroupInsigniaID","type":"LLUUID","size":1},{"name":"Contribution","type":"S32","size":1},{"name":"GroupName","type":"Variable","size":"1"}]}]},{"name":"AgentDropGroup","frequency":"Low","id":"390","flags":["Trusted","Zerocoded","UDPDeprecated"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"GroupID","type":"LLUUID","size":1}]}]},{"name":"LogTextMessage","frequency":"Low","id":"391","flags":["Trusted","Zerocoded"],"blocks":[{"name":"DataBlock","type":"Variable","count":1,"params":[{"name":"FromAgentId","type":"LLUUID","size":1},{"name":"ToAgentId","type":"LLUUID","size":1},{"name":"GlobalX","type":"F64","size":1},{"name":"GlobalY","type":"F64","size":1},{"name":"Time","type":"U32","size":1},{"name":"Message","type":"Variable","size":"2"}]}]},{"name":"ViewerEffect","frequency":"Medium","id":"17","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"Effect","type":"Variable","count":1,"params":[{"name":"ID","type":"LLUUID","size":1},{"name":"AgentID","type":"LLUUID","size":1},{"name":"Type","type":"U8","size":1},{"name":"Duration","type":"F32","size":1},{"name":"Color","type":"Fixed","size":"4"},{"name":"TypeData","type":"Variable","size":"1"}]}]},{"name":"CreateTrustedCircuit","frequency":"Low","id":"392","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"DataBlock","type":"Single","count":1,"params":[{"name":"EndPointID","type":"LLUUID","size":1},{"name":"Digest","type":"Fixed","size":"32"}]}]},{"name":"DenyTrustedCircuit","frequency":"Low","id":"393","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"DataBlock","type":"Single","count":1,"params":[{"name":"EndPointID","type":"LLUUID","size":1}]}]},{"name":"RequestTrustedCircuit","frequency":"Low","id":"394","flags":["Trusted","Unencoded"],"blocks":[]},{"name":"RezSingleAttachmentFromInv","frequency":"Low","id":"395","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"ObjectData","type":"Single","count":1,"params":[{"name":"ItemID","type":"LLUUID","size":1},{"name":"OwnerID","type":"LLUUID","size":1},{"name":"AttachmentPt","type":"U8","size":1},{"name":"ItemFlags","type":"U32","size":1},{"name":"GroupMask","type":"U32","size":1},{"name":"EveryoneMask","type":"U32","size":1},{"name":"NextOwnerMask","type":"U32","size":1},{"name":"Name","type":"Variable","size":"1"},{"name":"Description","type":"Variable","size":"1"}]}]},{"name":"RezMultipleAttachmentsFromInv","frequency":"Low","id":"396","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"HeaderData","type":"Single","count":1,"params":[{"name":"CompoundMsgID","type":"LLUUID","size":1},{"name":"TotalObjects","type":"U8","size":1},{"name":"FirstDetachAll","type":"BOOL","size":1}]},{"name":"ObjectData","type":"Variable","count":"//","params":[{"name":"ItemID","type":"LLUUID","size":1},{"name":"OwnerID","type":"LLUUID","size":1},{"name":"AttachmentPt","type":"U8","size":1},{"name":"ItemFlags","type":"U32","size":1},{"name":"GroupMask","type":"U32","size":1},{"name":"EveryoneMask","type":"U32","size":1},{"name":"NextOwnerMask","type":"U32","size":1},{"name":"Name","type":"Variable","size":"1"},{"name":"Description","type":"Variable","size":"1"}]}]},{"name":"DetachAttachmentIntoInv","frequency":"Low","id":"397","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"ObjectData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"ItemID","type":"LLUUID","size":1}]}]},{"name":"CreateNewOutfitAttachments","frequency":"Low","id":"398","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"HeaderData","type":"Single","count":1,"params":[{"name":"NewFolderID","type":"LLUUID","size":1}]},{"name":"ObjectData","type":"Variable","count":1,"params":[{"name":"OldItemID","type":"LLUUID","size":1},{"name":"OldFolderID","type":"LLUUID","size":1}]}]},{"name":"UserInfoRequest","frequency":"Low","id":"399","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]}]},{"name":"UserInfoReply","frequency":"Low","id":"400","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1}]},{"name":"UserData","type":"Single","count":1,"params":[{"name":"IMViaEMail","type":"BOOL","size":1},{"name":"DirectoryVisibility","type":"Variable","size":"1"},{"name":"EMail","type":"Variable","size":"2"}]}]},{"name":"UpdateUserInfo","frequency":"Low","id":"401","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"UserData","type":"Single","count":1,"params":[{"name":"IMViaEMail","type":"BOOL","size":1},{"name":"DirectoryVisibility","type":"Variable","size":"1"}]}]},{"name":"ParcelRename","frequency":"Low","id":"402","flags":["Trusted","Unencoded"],"blocks":[{"name":"ParcelData","type":"Variable","count":1,"params":[{"name":"ParcelID","type":"LLUUID","size":1},{"name":"NewName","type":"Variable","size":"1"}]}]},{"name":"InitiateDownload","frequency":"Low","id":"403","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1}]},{"name":"FileData","type":"Single","count":1,"params":[{"name":"SimFilename","type":"Variable","size":"1"},{"name":"ViewerFilename","type":"Variable","size":"1"}]}]},{"name":"SystemMessage","frequency":"Low","id":"404","flags":["Trusted","Zerocoded"],"blocks":[{"name":"MethodData","type":"Single","count":1,"params":[{"name":"Method","type":"Variable","size":"1"},{"name":"Invoice","type":"LLUUID","size":1},{"name":"Digest","type":"Fixed","size":"32"}]},{"name":"ParamList","type":"Variable","count":1,"params":[{"name":"Parameter","type":"Variable","size":"1"}]}]},{"name":"MapLayerRequest","frequency":"Low","id":"405","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"Flags","type":"U32","size":1},{"name":"EstateID","type":"U32","size":1},{"name":"Godlike","type":"BOOL","size":1}]}]},{"name":"MapLayerReply","frequency":"Low","id":"406","flags":["Trusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"Flags","type":"U32","size":1}]},{"name":"LayerData","type":"Variable","count":1,"params":[{"name":"Left","type":"U32","size":1},{"name":"Right","type":"U32","size":1},{"name":"Top","type":"U32","size":1},{"name":"Bottom","type":"U32","size":1},{"name":"ImageID","type":"LLUUID","size":1}]}]},{"name":"MapBlockRequest","frequency":"Low","id":"407","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"Flags","type":"U32","size":1},{"name":"EstateID","type":"U32","size":1},{"name":"Godlike","type":"BOOL","size":1}]},{"name":"PositionData","type":"Single","count":1,"params":[{"name":"MinX","type":"U16","size":1},{"name":"MaxX","type":"U16","size":1},{"name":"MinY","type":"U16","size":1},{"name":"MaxY","type":"U16","size":1}]}]},{"name":"MapNameRequest","frequency":"Low","id":"408","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"Flags","type":"U32","size":1},{"name":"EstateID","type":"U32","size":1},{"name":"Godlike","type":"BOOL","size":1}]},{"name":"NameData","type":"Single","count":1,"params":[{"name":"Name","type":"Variable","size":"1"}]}]},{"name":"MapBlockReply","frequency":"Low","id":"409","flags":["Trusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"Flags","type":"U32","size":1}]},{"name":"Data","type":"Variable","count":1,"params":[{"name":"X","type":"U16","size":1},{"name":"Y","type":"U16","size":1},{"name":"Name","type":"Variable","size":"1"},{"name":"Access","type":"U8","size":1},{"name":"RegionFlags","type":"U32","size":1},{"name":"WaterHeight","type":"U8","size":1},{"name":"Agents","type":"U8","size":1},{"name":"MapImageID","type":"LLUUID","size":1}]}]},{"name":"MapItemRequest","frequency":"Low","id":"410","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"Flags","type":"U32","size":1},{"name":"EstateID","type":"U32","size":1},{"name":"Godlike","type":"BOOL","size":1}]},{"name":"RequestData","type":"Single","count":1,"params":[{"name":"ItemType","type":"U32","size":1},{"name":"RegionHandle","type":"U64","size":1}]}]},{"name":"MapItemReply","frequency":"Low","id":"411","flags":["Trusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"Flags","type":"U32","size":1}]},{"name":"RequestData","type":"Single","count":1,"params":[{"name":"ItemType","type":"U32","size":1}]},{"name":"Data","type":"Variable","count":1,"params":[{"name":"X","type":"U32","size":1},{"name":"Y","type":"U32","size":1},{"name":"ID","type":"LLUUID","size":1},{"name":"Extra","type":"S32","size":1},{"name":"Extra2","type":"S32","size":1},{"name":"Name","type":"Variable","size":"1"}]}]},{"name":"SendPostcard","frequency":"Low","id":"412","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"AssetID","type":"LLUUID","size":1},{"name":"PosGlobal","type":"LLVector3d","size":1},{"name":"To","type":"Variable","size":"1"},{"name":"From","type":"Variable","size":"1"},{"name":"Name","type":"Variable","size":"1"},{"name":"Subject","type":"Variable","size":"1"},{"name":"Msg","type":"Variable","size":"2"},{"name":"AllowPublish","type":"BOOL","size":1},{"name":"MaturePublish","type":"BOOL","size":1}]}]},{"name":"RpcChannelRequest","frequency":"Low","id":"413","flags":["Trusted","Unencoded"],"blocks":[{"name":"DataBlock","type":"Single","count":1,"params":[{"name":"GridX","type":"U32","size":1},{"name":"GridY","type":"U32","size":1},{"name":"TaskID","type":"LLUUID","size":1},{"name":"ItemID","type":"LLUUID","size":1}]}]},{"name":"RpcChannelReply","frequency":"Low","id":"414","flags":["Trusted","Unencoded"],"blocks":[{"name":"DataBlock","type":"Single","count":1,"params":[{"name":"TaskID","type":"LLUUID","size":1},{"name":"ItemID","type":"LLUUID","size":1},{"name":"ChannelID","type":"LLUUID","size":1}]}]},{"name":"RpcScriptRequestInbound","frequency":"Low","id":"415","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"TargetBlock","type":"Single","count":1,"params":[{"name":"GridX","type":"U32","size":1},{"name":"GridY","type":"U32","size":1}]},{"name":"DataBlock","type":"Single","count":1,"params":[{"name":"TaskID","type":"LLUUID","size":1},{"name":"ItemID","type":"LLUUID","size":1},{"name":"ChannelID","type":"LLUUID","size":1},{"name":"IntValue","type":"U32","size":1},{"name":"StringValue","type":"Variable","size":"2"}]}]},{"name":"RpcScriptRequestInboundForward","frequency":"Low","id":"416","flags":["Trusted","Unencoded","UDPDeprecated"],"blocks":[{"name":"DataBlock","type":"Single","count":1,"params":[{"name":"RPCServerIP","type":"IPADDR","size":1},{"name":"RPCServerPort","type":"IPPORT","size":1},{"name":"TaskID","type":"LLUUID","size":1},{"name":"ItemID","type":"LLUUID","size":1},{"name":"ChannelID","type":"LLUUID","size":1},{"name":"IntValue","type":"U32","size":1},{"name":"StringValue","type":"Variable","size":"2"}]}]},{"name":"RpcScriptReplyInbound","frequency":"Low","id":"417","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"DataBlock","type":"Single","count":1,"params":[{"name":"TaskID","type":"LLUUID","size":1},{"name":"ItemID","type":"LLUUID","size":1},{"name":"ChannelID","type":"LLUUID","size":1},{"name":"IntValue","type":"U32","size":1},{"name":"StringValue","type":"Variable","size":"2"}]}]},{"name":"ScriptMailRegistration","frequency":"Low","id":"418","flags":["Trusted","Unencoded"],"blocks":[{"name":"DataBlock","type":"Single","count":1,"params":[{"name":"TargetIP","type":"Variable","size":"1"},{"name":"TargetPort","type":"IPPORT","size":1},{"name":"TaskID","type":"LLUUID","size":1},{"name":"Flags","type":"U32","size":1}]}]},{"name":"ParcelMediaCommandMessage","frequency":"Low","id":"419","flags":["Trusted","Unencoded"],"blocks":[{"name":"CommandBlock","type":"Single","count":1,"params":[{"name":"Flags","type":"U32","size":1},{"name":"Command","type":"U32","size":1},{"name":"Time","type":"F32","size":1}]}]},{"name":"ParcelMediaUpdate","frequency":"Low","id":"420","flags":["Trusted","Unencoded"],"blocks":[{"name":"DataBlock","type":"Single","count":1,"params":[{"name":"MediaURL","type":"Variable","size":"1"},{"name":"MediaID","type":"LLUUID","size":1},{"name":"MediaAutoScale","type":"U8","size":1}]},{"name":"DataBlockExtended","type":"Single","count":1,"params":[{"name":"MediaType","type":"Variable","size":"1"},{"name":"MediaDesc","type":"Variable","size":"1"},{"name":"MediaWidth","type":"S32","size":1},{"name":"MediaHeight","type":"S32","size":1},{"name":"MediaLoop","type":"U8","size":1}]}]},{"name":"LandStatRequest","frequency":"Low","id":"421","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"RequestData","type":"Single","count":1,"params":[{"name":"ReportType","type":"U32","size":1},{"name":"RequestFlags","type":"U32","size":1},{"name":"Filter","type":"Variable","size":"1"},{"name":"ParcelLocalID","type":"S32","size":1}]}]},{"name":"LandStatReply","frequency":"Low","id":"422","flags":["Trusted","Unencoded","UDPDeprecated"],"blocks":[{"name":"RequestData","type":"Single","count":1,"params":[{"name":"ReportType","type":"U32","size":1},{"name":"RequestFlags","type":"U32","size":1},{"name":"TotalObjectCount","type":"U32","size":1}]},{"name":"ReportData","type":"Variable","count":1,"params":[{"name":"TaskLocalID","type":"U32","size":1},{"name":"TaskID","type":"LLUUID","size":1},{"name":"LocationX","type":"F32","size":1},{"name":"LocationY","type":"F32","size":1},{"name":"LocationZ","type":"F32","size":1},{"name":"Score","type":"F32","size":1},{"name":"TaskName","type":"Variable","size":"1"},{"name":"OwnerName","type":"Variable","size":"1"}]}]},{"name":"Error","frequency":"Low","id":"423","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1}]},{"name":"Data","type":"Single","count":1,"params":[{"name":"Code","type":"S32","size":1},{"name":"Token","type":"Variable","size":"1"},{"name":"ID","type":"LLUUID","size":1},{"name":"System","type":"Variable","size":"1"},{"name":"Message","type":"Variable","size":"2"},{"name":"Data","type":"Variable","size":"2"}]}]},{"name":"ObjectIncludeInSearch","frequency":"Low","id":"424","flags":["NotTrusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"ObjectData","type":"Variable","count":1,"params":[{"name":"ObjectLocalID","type":"U32","size":1},{"name":"IncludeInSearch","type":"BOOL","size":1}]}]},{"name":"RezRestoreToWorld","frequency":"Low","id":"425","flags":["NotTrusted","Unencoded","UDPDeprecated"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"InventoryData","type":"Single","count":1,"params":[{"name":"ItemID","type":"LLUUID","size":1},{"name":"FolderID","type":"LLUUID","size":1},{"name":"CreatorID","type":"LLUUID","size":1},{"name":"OwnerID","type":"LLUUID","size":1},{"name":"GroupID","type":"LLUUID","size":1},{"name":"BaseMask","type":"U32","size":1},{"name":"OwnerMask","type":"U32","size":1},{"name":"GroupMask","type":"U32","size":1},{"name":"EveryoneMask","type":"U32","size":1},{"name":"NextOwnerMask","type":"U32","size":1},{"name":"GroupOwned","type":"BOOL","size":1},{"name":"TransactionID","type":"LLUUID","size":1},{"name":"Type","type":"S8","size":1},{"name":"InvType","type":"S8","size":1},{"name":"Flags","type":"U32","size":1},{"name":"SaleType","type":"U8","size":1},{"name":"SalePrice","type":"S32","size":1},{"name":"Name","type":"Variable","size":"1"},{"name":"Description","type":"Variable","size":"1"},{"name":"CreationDate","type":"S32","size":1},{"name":"CRC","type":"U32","size":1}]}]},{"name":"LinkInventoryItem","frequency":"Low","id":"426","flags":["NotTrusted","Zerocoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1}]},{"name":"InventoryBlock","type":"Single","count":1,"params":[{"name":"CallbackID","type":"U32","size":1},{"name":"FolderID","type":"LLUUID","size":1},{"name":"TransactionID","type":"LLUUID","size":1},{"name":"OldItemID","type":"LLUUID","size":1},{"name":"Type","type":"S8","size":1},{"name":"InvType","type":"S8","size":1},{"name":"Name","type":"Variable","size":"1"},{"name":"Description","type":"Variable","size":"1"}]}]},{"name":"RetrieveIMsExtended","frequency":"Low","id":"427","flags":["Trusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"IsPremium","type":"BOOL","size":1}]}]},{"name":"JoinGroupRequestExtended","frequency":"Low","id":"428","flags":["Trusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"GroupLimit","type":"S32","size":1}]},{"name":"GroupData","type":"Single","count":1,"params":[{"name":"GroupID","type":"LLUUID","size":1}]}]},{"name":"CreateGroupRequestExtended","frequency":"Low","id":"429","flags":["Trusted","Unencoded"],"blocks":[{"name":"AgentData","type":"Single","count":1,"params":[{"name":"AgentID","type":"LLUUID","size":1},{"name":"SessionID","type":"LLUUID","size":1},{"name":"GroupLimit","type":"S32","size":1}]},{"name":"GroupData","type":"Single","count":1,"params":[{"name":"Name","type":"Variable","size":"1"},{"name":"Charter","type":"Variable","size":"2"},{"name":"ShowInList","type":"BOOL","size":1},{"name":"InsigniaID","type":"LLUUID","size":1},{"name":"MembershipFee","type":"S32","size":1},{"name":"OpenEnrollment","type":"BOOL","size":1},{"name":"AllowPublish","type":"BOOL","size":1},{"name":"MaturePublish","type":"BOOL","size":1}]}]}] \ No newline at end of file diff --git a/tools/msg_template.msg b/tools/msg_template.msg new file mode 100644 index 0000000..14fe167 --- /dev/null +++ b/tools/msg_template.msg @@ -0,0 +1,9131 @@ +// Linden Lab development message templates + +version 2.0 + +// The Version 2.0 template requires preservation of message +// numbers. Each message must be numbered relative to the +// other messages of that type. The current highest number +// for each type is listed below: +// Low: 429 +// Medium: 18 +// High: 29 +// PLEASE UPDATE THIS WHEN YOU ADD A NEW MESSAGE! + + +// ************************************************************************* +// Test Message +// ************************************************************************* + +// Test Message + +{ + TestMessage Low 1 NotTrusted Zerocoded + { + TestBlock1 Single + { Test1 U32 } + } + { + NeighborBlock Multiple 4 + { Test0 U32 } + { Test1 U32 } + { Test2 U32 } + } +} + +// ************************************************************************* +// Messaging Internal Data Management Message +// ************************************************************************* + +// ************************* +// List fixed messages first +// ************************* + + +// Packet Ack - Ack a list of packets sent reliable +{ + PacketAck Fixed 0xFFFFFFFB NotTrusted Unencoded + { + Packets Variable + { ID U32 } + } +} + + +// OpenCircuit - Tells the recipient's messaging system to open the descibed circuit +{ + OpenCircuit Fixed 0xFFFFFFFC NotTrusted Unencoded UDPBlackListed + { + CircuitInfo Single + { IP IPADDR } + { Port IPPORT } + } +} + + +// CloseCircuit - Tells the recipient's messaging system to close the descibed circuit +{ + CloseCircuit Fixed 0xFFFFFFFD NotTrusted Unencoded +} + + +// ****************** +// End fixed messages +// ****************** + +// StartPingCheck - used to measure circuit ping times +// PingID is used to determine how backlogged the ping was that was +// returned (or how hosed the other side is) +{ + StartPingCheck High 1 NotTrusted Unencoded + { + PingID Single + { PingID U8 } + { OldestUnacked U32 } // Current oldest "unacked" packet on the sender side + } +} + +// CompletePingCheck - used to measure circuit ping times + +{ + CompletePingCheck High 2 NotTrusted Unencoded + { + PingID Single + { PingID U8 } + } +} + +// space->sim +// sim->sim +// AddCircuitCode - Tells the recipient's messaging system that this code +// is for a legal circuit +{ + AddCircuitCode Low 2 Trusted Unencoded + { + CircuitCode Single + { Code U32 } + { SessionID LLUUID } + { AgentID LLUUID } // WARNING - may be null in valid message + } +} + +// viewer->sim +// UseCircuitCode - Attempts to provide the recipient with IP and Port +// info. In the case of viewers, the id is the session id. For other +// machines it may be null. The session id will always be the session +// id of the process, which every server will generate on startup and +// the viewer will be handed after login. +{ + UseCircuitCode Low 3 NotTrusted Unencoded + { + CircuitCode Single + { Code U32 } + { SessionID LLUUID } + { ID LLUUID } // agent id + } +} + + +// ************************************************************************* +// SpaceServer to Simulator Messages +// ************************************************************************ + +// Neighbor List - Passed anytime neighbors change +{ + NeighborList High 3 Trusted Unencoded + { + NeighborBlock Multiple 4 + { IP IPADDR } + { Port IPPORT } + { PublicIP IPADDR } + { PublicPort IPPORT } + { RegionID LLUUID } + { Name Variable 1 } // string + { SimAccess U8 } + } +} + + +// AvatarTextureUpdate +// simulator -> dataserver +// reliable +{ + AvatarTextureUpdate Low 4 Trusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { TexturesChanged BOOL } + } + { + WearableData Variable + { CacheID LLUUID } + { TextureIndex U8 } + { HostName Variable 1 } + } + { + TextureData Variable + { TextureID LLUUID } + } +} + + +// SimulatorMapUpdate +// simulator -> dataserver +// reliable +{ + SimulatorMapUpdate Low 5 Trusted Unencoded + { + MapData Single + { Flags U32 } + } +} + +// SimulatorSetMap +// simulator -> dataserver +// reliable +// Used to upload a map image into the database (currently used only for Land For Sale) +{ + SimulatorSetMap Low 6 Trusted Unencoded + { + MapData Single + { RegionHandle U64 } + { Type S32 } + { MapImage LLUUID } + } +} + +// SubscribeLoad +// spaceserver -> simulator +// reliable +{ + SubscribeLoad Low 7 Trusted Unencoded +} + +// UnsubscribeLoad +// spaceserver -> simulator +// reliable +{ + UnsubscribeLoad Low 8 Trusted Unencoded +} + + +// ************************************************************************ +// Simulator to SpaceServer Messages +// ************************************************************************ + +// SimulatorReady - indicates the sim has finished loading its state +// and is ready to receive updates from others +{ + SimulatorReady Low 9 Trusted Zerocoded + { + SimulatorBlock Single + { SimName Variable 1 } + { SimAccess U8 } + { RegionFlags U32 } + { RegionID LLUUID } + { EstateID U32 } + { ParentEstateID U32 } + } + { + TelehubBlock Single + { HasTelehub BOOL } + { TelehubPos LLVector3 } + } +} + +// TelehubInfo - fill in the UI for telehub creation floater. +// sim -> viewer +// reliable +{ + TelehubInfo Low 10 Trusted Unencoded + { + TelehubBlock Single + { ObjectID LLUUID } // null if no telehub + { ObjectName Variable 1 } // string + { TelehubPos LLVector3 } // fallback if viewer can't find object + { TelehubRot LLQuaternion } + } + { + SpawnPointBlock Variable + { SpawnPointPos LLVector3 } // relative to telehub position + } +} + +// SimulatorPresentAtLocation - indicates that the sim is present at a grid +// location and passes what it believes its neighbors are +{ + SimulatorPresentAtLocation Low 11 Trusted Unencoded + { + SimulatorPublicHostBlock Single + { Port IPPORT } + { SimulatorIP IPADDR } + { GridX U32 } + { GridY U32 } + } + { + NeighborBlock Multiple 4 + { IP IPADDR } + { Port IPPORT } + } + { + SimulatorBlock Single + { SimName Variable 1 } + { SimAccess U8 } + { RegionFlags U32 } + { RegionID LLUUID } + { EstateID U32 } + { ParentEstateID U32 } + } + { + TelehubBlock Variable + { HasTelehub BOOL } + { TelehubPos LLVector3 } + } +} + +// SimulatorLoad +// simulator -> spaceserver +// reliable +{ + SimulatorLoad Low 12 Trusted Unencoded + { + SimulatorLoad Single + { TimeDilation F32 } + { AgentCount S32 } + { CanAcceptAgents BOOL } + } + { + AgentList Variable + { CircuitCode U32 } + { X U8 } + { Y U8 } + } +} + +// Simulator Shutdown Request - Tells spaceserver that a simulator is trying to shutdown +{ + SimulatorShutdownRequest Low 13 Trusted Unencoded +} + +// **************************************************************************** +// Presense messages +// **************************************************************************** + +// sim -> dataserver +{ + RegionPresenceRequestByRegionID Low 14 Trusted Unencoded + { + RegionData Variable + { RegionID LLUUID } + } +} + +// sim -> dataserver +{ + RegionPresenceRequestByHandle Low 15 Trusted Unencoded + { + RegionData Variable + { RegionHandle U64 } + } +} + +// dataserver -> sim +{ + RegionPresenceResponse Low 16 Trusted Zerocoded + { + RegionData Variable + { RegionID LLUUID } + { RegionHandle U64 } + { InternalRegionIP IPADDR } + { ExternalRegionIP IPADDR } + { RegionPort IPPORT } + { ValidUntil F64 } + { Message Variable 1 } + } +} + + +// **************************************************************************** +// Simulator to dataserver messages +// **************************************************************************** + +// Updates SimName, EstateID and SimAccess using RegionID as a key +{ + UpdateSimulator Low 17 Trusted Unencoded + { + SimulatorInfo Single + { RegionID LLUUID } + { SimName Variable 1 } + { EstateID U32 } + { SimAccess U8 } + } +} + + +// record dwell time. +{ + LogDwellTime Low 18 Trusted Unencoded + { + DwellInfo Single + { AgentID LLUUID } + { SessionID LLUUID } + { Duration F32 } + { SimName Variable 1 } + { RegionX U32 } + { RegionY U32 } + { AvgAgentsInView U8 } + { AvgViewerFPS U8 } + } +} + +// Disabled feature response message +{ + FeatureDisabled Low 19 Trusted Unencoded + { + FailureInfo Single + { ErrorMessage Variable 1 } + { AgentID LLUUID } + { TransactionID LLUUID } + } +} + + +// record lost money transactions. This message could be generated +// from either the simulator or the dataserver, depending on how +// the transaction failed. +{ + LogFailedMoneyTransaction Low 20 Trusted Unencoded + { + TransactionData Single + { TransactionID LLUUID } + { TransactionTime U32 } // utc seconds since epoch + { TransactionType S32 } // see lltransactiontypes.h + { SourceID LLUUID } + { DestID LLUUID } // destination of the transfer + { Flags U8 } + { Amount S32 } + { SimulatorIP IPADDR } // U32 encoded IP + { GridX U32 } + { GridY U32 } + { FailureType U8 } + } +} + +// complaint/bug-report - sim -> dataserver. see UserReport for details. +// reliable +{ + UserReportInternal Low 21 Trusted Zerocoded + { + ReportData Single + { ReportType U8 } + { Category U8 } + { ReporterID LLUUID } + { ViewerPosition LLVector3 } + { AgentPosition LLVector3 } + { ScreenshotID LLUUID } + { ObjectID LLUUID } + { OwnerID LLUUID } + { LastOwnerID LLUUID } + { CreatorID LLUUID } + { RegionID LLUUID } + { AbuserID LLUUID } + { AbuseRegionName Variable 1 } + { AbuseRegionID LLUUID } + { Summary Variable 1 } + { Details Variable 2 } + { VersionString Variable 1 } + } +} + +// SetSimStatusInDatabase +// alters the "simulator" table in the database +// sim -> dataserver +// reliable +{ + SetSimStatusInDatabase Low 22 Trusted Unencoded + { + Data Single + { RegionID LLUUID } + { HostName Variable 1 } + { X S32 } + { Y S32 } + { PID S32 } + { AgentCount S32 } + { TimeToLive S32 } // in seconds + { Status Variable 1 } + } +} + +// SetSimPresenceInDatabase +// updates the "presence" table in the database to ensure +// that a given simulator is present and valid for a set amount of +// time +{ + SetSimPresenceInDatabase Low 23 Trusted Unencoded UDPDeprecated + { + SimData Single + { RegionID LLUUID } + { HostName Variable 1 } + { GridX U32 } + { GridY U32 } + { PID S32 } + { AgentCount S32 } + { TimeToLive S32 } // in seconds + { Status Variable 1 } + } +} + +// *************************************************************************** +// Economy messages +// *************************************************************************** + +// once we use local stats, this will include a region handle +{ + EconomyDataRequest Low 24 NotTrusted Unencoded +} + +// dataserver to sim, response w/ econ data +{ + EconomyData Low 25 Trusted Zerocoded + { + Info Single + { ObjectCapacity S32 } + { ObjectCount S32 } + { PriceEnergyUnit S32 } + { PriceObjectClaim S32 } + { PricePublicObjectDecay S32 } + { PricePublicObjectDelete S32 } + { PriceParcelClaim S32 } + { PriceParcelClaimFactor F32 } + { PriceUpload S32 } + { PriceRentLight S32 } + { TeleportMinPrice S32 } + { TeleportPriceExponent F32 } + { EnergyEfficiency F32 } + { PriceObjectRent F32 } + { PriceObjectScaleFactor F32 } + { PriceParcelRent S32 } + { PriceGroupCreate S32 } + } +} + +// *************************************************************************** +// Search messages +// *************************************************************************** + +// AvatarPickerRequest +// Get a list of names to select a person +// viewer -> sim -> data +// reliable +{ + AvatarPickerRequest Low 26 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + { QueryID LLUUID } + } + { + Data Single + { Name Variable 1 } + } +} + +// backend implementation which tracks if the user is a god. +{ + AvatarPickerRequestBackend Low 27 Trusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + { QueryID LLUUID } + { GodLevel U8 } + } + { + Data Single + { Name Variable 1 } + } +} + +// AvatarPickerReply +// List of names to select a person +// reliable +{ + AvatarPickerReply Low 28 Trusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { QueryID LLUUID } + } + { + Data Variable + { AvatarID LLUUID } + { FirstName Variable 1 } + { LastName Variable 1 } + } +} + +// PlacesQuery +// Used for getting a list of places for the group land panel +// and the user land holdings panel. NOT for the directory. +{ + PlacesQuery Low 29 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + { QueryID LLUUID } + } + { + TransactionData Single + { TransactionID LLUUID } + } + { + QueryData Single + { QueryText Variable 1 } + { QueryFlags U32 } + { Category S8 } + { SimName Variable 1 } + } +} + +// PlacesReply +// dataserver -> simulator -> viewer +// If the user has specified a location, use that to compute +// global x,y,z. Otherwise, use center of the AABB. +// reliable +{ + PlacesReply Low 30 Trusted Zerocoded UDPDeprecated + { + AgentData Single + { AgentID LLUUID } + { QueryID LLUUID } + } + { + TransactionData Single + { TransactionID LLUUID } + } + { + QueryData Variable + { OwnerID LLUUID } + { Name Variable 1 } + { Desc Variable 1 } + { ActualArea S32 } + { BillableArea S32 } + { Flags U8 } + { GlobalX F32 } // meters + { GlobalY F32 } // meters + { GlobalZ F32 } // meters + { SimName Variable 1 } + { SnapshotID LLUUID } + { Dwell F32 } + { Price S32 } + //{ ProductSKU Variable 1 } + } +} + +// DirFindQuery viewer->sim +// Message to start asking questions for the directory +{ + DirFindQuery Low 31 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + QueryData Single + { QueryID LLUUID } + { QueryText Variable 1 } + { QueryFlags U32 } + { QueryStart S32 } // prev/next page support + } +} + +// DirFindQueryBackend sim->data +// Trusted message generated by receipt of DirFindQuery to sim. +{ + DirFindQueryBackend Low 32 Trusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + } + { + QueryData Single + { QueryID LLUUID } + { QueryText Variable 1 } + { QueryFlags U32 } + { QueryStart S32 } // prev/next page support + { EstateID U32 } + { Godlike BOOL } + } +} + + +// DirPlacesQuery viewer->sim +// Used for the Find directory of places +{ + DirPlacesQuery Low 33 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + QueryData Single + { QueryID LLUUID } + { QueryText Variable 1 } + { QueryFlags U32 } + { Category S8 } + { SimName Variable 1 } + { QueryStart S32 } + } +} + +// DirPlacesQueryBackend sim->dataserver +// Used for the Find directory of places. +{ + DirPlacesQueryBackend Low 34 Trusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + } + { + QueryData Single + { QueryID LLUUID } + { QueryText Variable 1 } + { QueryFlags U32 } + { Category S8 } + { SimName Variable 1 } + { EstateID U32 } + { Godlike BOOL } + { QueryStart S32 } + } +} + +// DirPlacesReply dataserver->sim->viewer +// If the user has specified a location, use that to compute +// global x,y,z. Otherwise, use center of the AABB. +// reliable +{ + DirPlacesReply Low 35 Trusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + } + { + QueryData Variable + { QueryID LLUUID } + } + { + QueryReplies Variable + { ParcelID LLUUID } + { Name Variable 1 } + { ForSale BOOL } + { Auction BOOL } + { Dwell F32 } + } + { + StatusData Variable + { Status U32 } + } +} + +// DirPeopleReply +{ + DirPeopleReply Low 36 Trusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + } + { + QueryData Single + { QueryID LLUUID } + } + { + QueryReplies Variable + { AgentID LLUUID } + { FirstName Variable 1 } + { LastName Variable 1 } + { Group Variable 1 } + { Online BOOL } + { Reputation S32 } + } +} + +// DirEventsReply +{ + DirEventsReply Low 37 Trusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + } + { + QueryData Single + { QueryID LLUUID } + } + { + QueryReplies Variable + { OwnerID LLUUID } + { Name Variable 1 } + { EventID U32 } + { Date Variable 1 } + { UnixTime U32 } + { EventFlags U32 } + } + { + StatusData Variable + { Status U32 } + } +} + +// DirGroupsReply +// dataserver -> userserver -> viewer +// reliable +{ + DirGroupsReply Low 38 Trusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + } + { + QueryData Single + { QueryID LLUUID } + } + { + QueryReplies Variable + { GroupID LLUUID } + { GroupName Variable 1 } // string + { Members S32 } + { SearchOrder F32 } + } +} + + +// DirClassifiedQuery viewer->sim +// reliable +{ + DirClassifiedQuery Low 39 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + QueryData Single + { QueryID LLUUID } + { QueryText Variable 1 } + { QueryFlags U32 } + { Category U32 } + { QueryStart S32 } + } +} + +// DirClassifiedQueryBackend sim->dataserver +// reliable +{ + DirClassifiedQueryBackend Low 40 Trusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + } + { + QueryData Single + { QueryID LLUUID } + { QueryText Variable 1 } + { QueryFlags U32 } + { Category U32 } + { EstateID U32 } + { Godlike BOOL } + { QueryStart S32 } + } +} + +// DirClassifiedReply dataserver->sim->viewer +// reliable +{ + DirClassifiedReply Low 41 Trusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + } + { + QueryData Single + { QueryID LLUUID } + } + { + QueryReplies Variable + { ClassifiedID LLUUID } + { Name Variable 1 } + { ClassifiedFlags U8 } + { CreationDate U32 } + { ExpirationDate U32 } + { PriceForListing S32 } + } + { + StatusData Variable + { Status U32 } + } +} + + +// AvatarClassifiedReply +// dataserver -> simulator -> viewer +// Send the header information for this avatar's classifieds +// This fills in the tabs of the Classifieds panel. +// reliable +{ + AvatarClassifiedReply Low 42 Trusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { TargetID LLUUID } + } + { + Data Variable + { ClassifiedID LLUUID } + { Name Variable 1 } + } +} + + +// ClassifiedInfoRequest +// viewer -> simulator +// simulator -> dataserver +// reliable +{ + ClassifiedInfoRequest Low 43 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + Data Single + { ClassifiedID LLUUID } + } +} + + +// ClassifiedInfoReply +// dataserver -> simulator +// simulator -> viewer +// reliable +{ + ClassifiedInfoReply Low 44 Trusted Unencoded + { + AgentData Single + { AgentID LLUUID } + } + { + Data Single + { ClassifiedID LLUUID } + { CreatorID LLUUID } + { CreationDate U32 } + { ExpirationDate U32 } + { Category U32 } + { Name Variable 1 } + { Desc Variable 2 } + { ParcelID LLUUID } + { ParentEstate U32 } + { SnapshotID LLUUID } + { SimName Variable 1 } + { PosGlobal LLVector3d } + { ParcelName Variable 1 } + { ClassifiedFlags U8 } + { PriceForListing S32 } + } +} + + +// ClassifiedInfoUpdate +// Update a classified. ParcelID and EstateID are set +// on the simulator as the message passes through. +// viewer -> simulator -> dataserver +// reliable +{ + ClassifiedInfoUpdate Low 45 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + Data Single + { ClassifiedID LLUUID } + { Category U32 } + { Name Variable 1 } + { Desc Variable 2 } + { ParcelID LLUUID } + { ParentEstate U32 } + { SnapshotID LLUUID } + { PosGlobal LLVector3d } + { ClassifiedFlags U8 } + { PriceForListing S32 } + } +} + + +// ClassifiedDelete +// Delete a classified from the database. +// viewer -> simulator -> dataserver +// reliable +{ + ClassifiedDelete Low 46 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + Data Single + { ClassifiedID LLUUID } + } +} + +// ClassifiedGodDelete +// Delete a classified from the database. +// QueryID is needed so database can send a repeat list of +// classified. +// viewer -> simulator -> dataserver +// reliable +{ + ClassifiedGodDelete Low 47 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + Data Single + { ClassifiedID LLUUID } + { QueryID LLUUID } + } +} + + +// DirLandQuery viewer->sim +// Special query for the land for sale/auction panel. +// reliable +{ + DirLandQuery Low 48 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + QueryData Single + { QueryID LLUUID } + { QueryFlags U32 } + { SearchType U32 } + { Price S32 } + { Area S32 } + { QueryStart S32 } + } +} + +// DirLandQueryBackend sim->dataserver +// Special query for the land for sale/auction panel. +{ + DirLandQueryBackend Low 49 Trusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + } + { + QueryData Single + { QueryID LLUUID } + { QueryFlags U32 } + { SearchType U32 } + { Price S32 } + { Area S32 } + { QueryStart S32 } + { EstateID U32 } + { Godlike BOOL } + } +} + +// DirLandReply +// dataserver -> simulator -> viewer +// reliable +{ + DirLandReply Low 50 Trusted Zerocoded UDPDeprecated + { + AgentData Single + { AgentID LLUUID } + } + { + QueryData Single + { QueryID LLUUID } + } + { + QueryReplies Variable + { ParcelID LLUUID } + { Name Variable 1 } + { Auction BOOL } + { ForSale BOOL } + { SalePrice S32 } + { ActualArea S32 } + //{ ProductSKU Variable 1 } + } +} + +// DEPRECATED: DirPopularQuery viewer->sim +// Special query for the land for sale/auction panel. +// reliable +{ + DirPopularQuery Low 51 NotTrusted Zerocoded Deprecated + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + QueryData Single + { QueryID LLUUID } + { QueryFlags U32 } + } +} + +// DEPRECATED: DirPopularQueryBackend sim->dataserver +// Special query for the land for sale/auction panel. +// reliable +{ + DirPopularQueryBackend Low 52 Trusted Zerocoded Deprecated + { + AgentData Single + { AgentID LLUUID } + } + { + QueryData Single + { QueryID LLUUID } + { QueryFlags U32 } + { EstateID U32 } + { Godlike BOOL } + } +} + +// DEPRECATED: DirPopularReply +// dataserver -> simulator -> viewer +// reliable +{ + DirPopularReply Low 53 Trusted Zerocoded Deprecated + { + AgentData Single + { AgentID LLUUID } + } + { + QueryData Single + { QueryID LLUUID } + } + { + QueryReplies Variable + { ParcelID LLUUID } + { Name Variable 1 } + { Dwell F32 } + } +} + +// ParcelInfoRequest +// viewer -> simulator -> dataserver +// reliable +{ + ParcelInfoRequest Low 54 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + Data Single + { ParcelID LLUUID } + } +} + +// ParcelInfoReply +// dataserver -> simulator -> viewer +// reliable +{ + ParcelInfoReply Low 55 Trusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + } + { + Data Single + { ParcelID LLUUID } + { OwnerID LLUUID } + { Name Variable 1 } + { Desc Variable 1 } + { ActualArea S32 } + { BillableArea S32 } + { Flags U8 } + { GlobalX F32 } // meters + { GlobalY F32 } // meters + { GlobalZ F32 } // meters + { SimName Variable 1 } + { SnapshotID LLUUID } + { Dwell F32 } + { SalePrice S32 } + { AuctionID S32 } + } +} + + +// ParcelObjectOwnersRequest +// viewer -> simulator +// reliable +{ + ParcelObjectOwnersRequest Low 56 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + ParcelData Single + { LocalID S32 } + } +} + + +// ParcelObjectOwnersReply +// simulator -> viewer +// reliable +{ + ParcelObjectOwnersReply Low 57 Trusted Zerocoded UDPDeprecated + { + Data Variable + { OwnerID LLUUID } + { IsGroupOwned BOOL } + { Count S32 } + { OnlineStatus BOOL } + } +} + +// GroupNoticeListRequest +// viewer -> simulator -> dataserver +// reliable +{ + GroupNoticesListRequest Low 58 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + Data Single + { GroupID LLUUID } + } +} + +// GroupNoticesListReply +// dataserver -> simulator -> viewer +// reliable +{ + GroupNoticesListReply Low 59 Trusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { GroupID LLUUID } + } + { + Data Variable + { NoticeID LLUUID } + { Timestamp U32 } + { FromName Variable 2 } + { Subject Variable 2 } + { HasAttachment BOOL } + { AssetType U8 } + } +} + +// GroupNoticeRequest +// viewer -> simulator +// simulator -> dataserver +// reliable +{ + GroupNoticeRequest Low 60 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + Data Single + { GroupNoticeID LLUUID } + } +} + +// GroupNoticeAdd +// Add a group notice. +// simulator -> dataserver +// reliable +{ + GroupNoticeAdd Low 61 Trusted Unencoded + { + AgentData Single + { AgentID LLUUID } + } + { + MessageBlock Single + { ToGroupID LLUUID } + { ID LLUUID } + { Dialog U8 } + { FromAgentName Variable 1 } + { Message Variable 2 } + { BinaryBucket Variable 2 } + } +} + + +// **************************************************************************** +// Teleport messages +// +// The teleport messages are numerous, so I have attempted to give them a +// consistent naming convention. Since there is a bit of glob pattern +// aliasing, the rules are applied in order. +// +// Teleport* - viewer->sim or sim->viewer message which announces a +// teleportation request, progrees, start, or end. +// Data* - sim->data or data->sim trusted message. +// Space* - sim->space or space->sim trusted messaging +// *Lure - A lure message to pass around information. +// +// All actual viewer teleports will begin with a Teleport* message and +// end in a TeleportStart, TeleportLocal or TeleportFailed message. The TeleportFailed +// message may be returned by any process and must be routed through the +// teleporting agent's simulator and back to the viewer. +// **************************************************************************** + +// TeleportRequest +// viewer -> sim specifying exact teleport destination +{ + TeleportRequest Low 62 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + Info Single + { RegionID LLUUID } + { Position LLVector3 } + { LookAt LLVector3 } + } +} + +// TeleportLocationRequest +// viewer -> sim specifying exact teleport destination +{ + TeleportLocationRequest Low 63 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + Info Single + { RegionHandle U64 } + { Position LLVector3 } + { LookAt LLVector3 } + } +} + +// TeleportLocal +// sim -> viewer reply telling the viewer that we've successfully TP'd +// to somewhere else within the sim +{ + TeleportLocal Low 64 Trusted Unencoded + { + Info Single + { AgentID LLUUID } + { LocationID U32 } + { Position LLVector3 } // region + { LookAt LLVector3 } + { TeleportFlags U32 } + } +} + +// TeleportLandmarkRequest viewer->sim +// teleport to landmark asset ID destination. use LLUUD::null for home. +{ + TeleportLandmarkRequest Low 65 NotTrusted Zerocoded + { + Info Single + { AgentID LLUUID } + { SessionID LLUUID } + { LandmarkID LLUUID } + } +} + +// TeleportProgress sim->viewer +// Tell the agent how the teleport is going. +{ + TeleportProgress Low 66 Trusted Unencoded + { + AgentData Single + { AgentID LLUUID } + } + { + Info Single + { TeleportFlags U32 } + { Message Variable 1 } // string + } +} + +// DataHomeLocationRequest sim->data +// Request +{ + DataHomeLocationRequest Low 67 Trusted Zerocoded + { + Info Single + { AgentID LLUUID } + { KickedFromEstateID U32 } + } + { + AgentInfo Single + { AgentEffectiveMaturity U32 } + } +} + +// DataHomeLocationReply data->sim +// response is the location of agent home. +{ + DataHomeLocationReply Low 68 Trusted Unencoded + { + Info Single + { AgentID LLUUID } + { RegionHandle U64 } + { Position LLVector3 } // region coords + { LookAt LLVector3 } + } +} + + +// TeleportFinish sim->viewer +// called when all of the information has been collected and readied for +// the agent. +{ + TeleportFinish Low 69 Trusted Unencoded UDPBlackListed + { + Info Single + { AgentID LLUUID } + { LocationID U32 } + { SimIP IPADDR } + { SimPort IPPORT } + { RegionHandle U64 } + { SeedCapability Variable 2 } // URL + { SimAccess U8 } + { TeleportFlags U32 } + } +} + +// StartLure viewer->sim +// Sent from viewer to the local simulator to lure target id to near +// agent id. This will generate an instant message that will be routed +// through the space server and out to the userserver. When that IM +// goes through the userserver and the TargetID is online, the +// userserver will send an InitializeLure to the spaceserver. When that +// packet is acked, the original instant message is finally forwarded to +// TargetID. +{ + StartLure Low 70 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + Info Single + { LureType U8 } + { Message Variable 1 } + } + { + TargetData Variable + { TargetID LLUUID } + } +} + +// TeleportLureRequest viewer->sim +// Message from target of lure to begin the teleport process on the +// local simulator. +{ + TeleportLureRequest Low 71 NotTrusted Unencoded + { + Info Single + { AgentID LLUUID } + { SessionID LLUUID } + { LureID LLUUID } + { TeleportFlags U32 } + } +} + +// TeleportCancel viewer->sim +// reliable +{ + TeleportCancel Low 72 NotTrusted Unencoded + { + Info Single + { AgentID LLUUID } + { SessionID LLUUID } + } +} + + +// TeleportStart sim->viewer +// announce a successful teleport request to the viewer. +{ + TeleportStart Low 73 Trusted Unencoded + { + Info Single + { TeleportFlags U32 } + } +} + +// TeleportFailed somewhere->sim->viewer +// announce failure of teleport request +{ + TeleportFailed Low 74 Trusted Unencoded + { + Info Single + { AgentID LLUUID } + { Reason Variable 1 } // string + } + { + AlertInfo Variable + { Message Variable 1 } // string id + { ExtraParams Variable 1 } // llsd extra parameters + } +} + + +// *************************************************************************** +// Viewer to Simulator Messages +// *************************************************************************** + +// Undo +{ + Undo Low 75 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + { GroupID LLUUID } + } + { + ObjectData Variable + { ObjectID LLUUID } + } +} + + +// Redo +{ + Redo Low 76 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + { GroupID LLUUID } + } + { + ObjectData Variable + { ObjectID LLUUID } + } +} + +// UndoLand +{ + UndoLand Low 77 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } +} + + +// AgentPause - viewer occasionally will block, inform simulator of this fact +{ + AgentPause Low 78 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + { SerialNum U32 } // U32, used by both pause and resume. Non-increasing numbers are ignored. + } +} + +// AgentResume - unblock the agent +{ + AgentResume Low 79 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + { SerialNum U32 } // U32, used by both pause and resume. Non-increasing numbers are ignored. + } +} + + +// AgentUpdate - Camera info sent from viewer to simulator +// or, more simply, two axes and compute cross product +// State data is temporary, indicates current behavior state: +// 0 = walking +// 1 = mouselook +// 2 = typing +// +// Center is region local (JNC 8.16.2001) +// Camera center is region local (JNC 8.29.2001) +{ + AgentUpdate High 4 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + { BodyRotation LLQuaternion } + { HeadRotation LLQuaternion } + { State U8 } + { CameraCenter LLVector3 } + { CameraAtAxis LLVector3 } + { CameraLeftAxis LLVector3 } + { CameraUpAxis LLVector3 } + { Far F32 } + { ControlFlags U32 } + { Flags U8 } + } +} + +// ChatFromViewer +// Specifies the text to be said and the "type", +// normal speech, shout, whisper. +// with the specified radius +{ + ChatFromViewer Low 80 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + ChatData Single + { Message Variable 2 } + { Type U8 } + { Channel S32 } + } +} + + +// AgentThrottle +{ + AgentThrottle Low 81 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + { CircuitCode U32 } + } + { + Throttle Single + { GenCounter U32 } + { Throttles Variable 1 } + } +} + + +// AgentFOV - Update to agent's field of view, angle is vertical, single F32 float in radians +{ + AgentFOV Low 82 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + { CircuitCode U32 } + } + { + FOVBlock Single + { GenCounter U32 } + { VerticalAngle F32 } + } +} + + +// AgentHeightWidth - Update to height and aspect, sent as height/width to save space +// Usually sent when window resized or created +{ + AgentHeightWidth Low 83 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + { CircuitCode U32 } + } + { + HeightWidthBlock Single + { GenCounter U32 } + { Height U16 } + { Width U16 } + } +} + + +// AgentSetAppearance - Update to agent appearance +{ + AgentSetAppearance Low 84 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + { SerialNum U32 } // U32, Increases every time the appearance changes. A value of 0 resets. + { Size LLVector3 } + } + { + WearableData Variable + { CacheID LLUUID } + { TextureIndex U8 } + } + { + ObjectData Single + { TextureEntry Variable 2 } + } + { + VisualParam Variable + { ParamValue U8 } + } +} + +// AgentAnimation - Update animation state +// viewer --> simulator +{ + AgentAnimation High 5 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + AnimationList Variable + { AnimID LLUUID } + { StartAnim BOOL } + } + { + PhysicalAvatarEventList Variable + { TypeData Variable 1 } + } +} + +// AgentRequestSit - Try to sit on an object +{ + AgentRequestSit High 6 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + TargetObject Single + { TargetID LLUUID } + { Offset LLVector3 } + } +} + +// AgentSit - Actually sit on object +{ + AgentSit High 7 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } +} + + +// quit message sent between simulators +{ + AgentQuitCopy Low 85 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + FuseBlock Single + { ViewerCircuitCode U32 } + } +} + + +// Request Image - Sent by the viewer to request a specified image at a specified resolution + +{ + RequestImage High 8 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + RequestImage Variable + { Image LLUUID } + { DiscardLevel S8 } + { DownloadPriority F32 } + { Packet U32 } + { Type U8 } + } +} + +// ImageNotInDatabase +// Simulator informs viewer that a requsted image definitely does not exist in the asset database +{ + ImageNotInDatabase Low 86 Trusted Unencoded + { + ImageID Single + { ID LLUUID } + } +} + +// RebakeAvatarTextures +// simulator -> viewer request when a temporary baked avatar texture is not found +{ + RebakeAvatarTextures Low 87 Trusted Unencoded + { + TextureData Single + { TextureID LLUUID } + } +} + + +// SetAlwaysRun +// Lets the viewer choose between running and walking +{ + SetAlwaysRun Low 88 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + { AlwaysRun BOOL } + } +} + +// ObjectAdd - create new object in the world +// Simulator will assign ID and send message back to signal +// object actually created. +// +// AddFlags (see also ObjectUpdate) +// 0x01 - use physics +// 0x02 - create selected +// +// If only one ImageID is sent for an object type that has more than +// one face, the same image is repeated on each subsequent face. +// +// Data field is opaque type-specific data for this object +{ + ObjectAdd Medium 1 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + { GroupID LLUUID } + } + { + ObjectData Single + { PCode U8 } + { Material U8 } + { AddFlags U32 } // see object_flags.h + + { PathCurve U8 } + { ProfileCurve U8 } + { PathBegin U16 } // 0 to 1, quanta = 0.01 + { PathEnd U16 } // 0 to 1, quanta = 0.01 + { PathScaleX U8 } // 0 to 1, quanta = 0.01 + { PathScaleY U8 } // 0 to 1, quanta = 0.01 + { PathShearX U8 } // -.5 to .5, quanta = 0.01 + { PathShearY U8 } // -.5 to .5, quanta = 0.01 + { PathTwist S8 } // -1 to 1, quanta = 0.01 + { PathTwistBegin S8 } // -1 to 1, quanta = 0.01 + { PathRadiusOffset S8 } // -1 to 1, quanta = 0.01 + { PathTaperX S8 } // -1 to 1, quanta = 0.01 + { PathTaperY S8 } // -1 to 1, quanta = 0.01 + { PathRevolutions U8 } // 0 to 3, quanta = 0.015 + { PathSkew S8 } // -1 to 1, quanta = 0.01 + { ProfileBegin U16 } // 0 to 1, quanta = 0.01 + { ProfileEnd U16 } // 0 to 1, quanta = 0.01 + { ProfileHollow U16 } // 0 to 1, quanta = 0.01 + + { BypassRaycast U8 } + { RayStart LLVector3 } + { RayEnd LLVector3 } + { RayTargetID LLUUID } + { RayEndIsIntersection U8 } + + { Scale LLVector3 } + { Rotation LLQuaternion } + + { State U8 } + } +} + + +// ObjectDelete +// viewer -> simulator +{ + ObjectDelete Low 89 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + { Force BOOL } // BOOL, god trying to force delete + } + { + ObjectData Variable + { ObjectLocalID U32 } + } +} + + +// ObjectDuplicate +// viewer -> simulator +// Makes a copy of a set of objects, offset by a given amount +{ + ObjectDuplicate Low 90 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + { GroupID LLUUID } + } + { + SharedData Single + { Offset LLVector3 } + { DuplicateFlags U32 } // see object_flags.h + } + { + ObjectData Variable + { ObjectLocalID U32 } + } +} + + +// ObjectDuplicateOnRay +// viewer -> simulator +// Makes a copy of an object, using the add object raycast +// code to abut it to other objects. +{ + ObjectDuplicateOnRay Low 91 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + { GroupID LLUUID } + { RayStart LLVector3 } // region local + { RayEnd LLVector3 } // region local + { BypassRaycast BOOL } + { RayEndIsIntersection BOOL } + { CopyCenters BOOL } + { CopyRotates BOOL } + { RayTargetID LLUUID } + { DuplicateFlags U32 } // see object_flags.h + } + { + ObjectData Variable + { ObjectLocalID U32 } + } +} + + +// MultipleObjectUpdate +// viewer -> simulator +// updates position, rotation and scale in one message +// positions sent as region-local floats +{ + MultipleObjectUpdate Medium 2 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + ObjectData Variable + { ObjectLocalID U32 } + { Type U8 } + { Data Variable 1 } // custom type + } +} + +// RequestMultipleObjects +// viewer -> simulator +// reliable +// +// When the viewer gets a local_id/crc for an object that +// it either doesn't have, or doesn't have the current version +// of, it sends this upstream get get an update. +// +// CacheMissType 0 => full object (viewer doesn't have it) +// CacheMissType 1 => CRC mismatch only +{ + RequestMultipleObjects Medium 3 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + ObjectData Variable + { CacheMissType U8 } + { ID U32 } + } +} + + +// DEPRECATED: ObjectPosition +// == Old Behavior == +// Set the position on objects +// +// == Reason for deprecation == +// Unused code path was removed in the move to Havok4 +// Object position, scale and rotation messages were already unified +// to MultipleObjectUpdate and this message was unused cruft. +// +// == New Location == +// MultipleObjectUpdate can be used instead. +{ + ObjectPosition Medium 4 NotTrusted Zerocoded Deprecated + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + ObjectData Variable + { ObjectLocalID U32 } + { Position LLVector3 } // region + } +} + + +// DEPRECATED: ObjectScale +// == Old Behavior == +// Set the scale on objects +// +// == Reason for deprecation == +// Unused code path was removed in the move to Havok4 +// Object position, scale and rotation messages were already unified +// to MultipleObjectUpdate and this message was unused cruft. +// +// == New Location == +// MultipleObjectUpdate can be used instead. +{ + ObjectScale Low 92 NotTrusted Zerocoded Deprecated + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + ObjectData Variable + { ObjectLocalID U32 } + { Scale LLVector3 } + } +} + + +// ObjectRotation +// viewer -> simulator +{ + ObjectRotation Low 93 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + ObjectData Variable + { ObjectLocalID U32 } + { Rotation LLQuaternion } + } +} + + +// ObjectFlagUpdate +// viewer -> simulator +{ + ObjectFlagUpdate Low 94 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + { ObjectLocalID U32 } + { UsePhysics BOOL } + { IsTemporary BOOL } + { IsPhantom BOOL } + { CastsShadows BOOL } + } + { + ExtraPhysics Variable + { PhysicsShapeType U8 } + { Density F32 } + { Friction F32 } + { Restitution F32 } + { GravityMultiplier F32 } + } +} + + +// ObjectClickAction +// viewer -> simulator +{ + ObjectClickAction Low 95 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + ObjectData Variable + { ObjectLocalID U32 } + { ClickAction U8 } + } +} + + +// ObjectImage +// viewer -> simulator +{ + ObjectImage Low 96 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + ObjectData Variable + { ObjectLocalID U32 } + { MediaURL Variable 1 } + { TextureEntry Variable 2 } + } +} + + +{ + ObjectMaterial Low 97 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + ObjectData Variable + { ObjectLocalID U32 } + { Material U8 } + } +} + + +{ + ObjectShape Low 98 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + ObjectData Variable + { ObjectLocalID U32 } + { PathCurve U8 } + { ProfileCurve U8 } + { PathBegin U16 } // 0 to 1, quanta = 0.01 + { PathEnd U16 } // 0 to 1, quanta = 0.01 + { PathScaleX U8 } // 0 to 1, quanta = 0.01 + { PathScaleY U8 } // 0 to 1, quanta = 0.01 + { PathShearX U8 } // -.5 to .5, quanta = 0.01 + { PathShearY U8 } // -.5 to .5, quanta = 0.01 + { PathTwist S8 } // -1 to 1, quanta = 0.01 + { PathTwistBegin S8 } // -1 to 1, quanta = 0.01 + { PathRadiusOffset S8 } // -1 to 1, quanta = 0.01 + { PathTaperX S8 } // -1 to 1, quanta = 0.01 + { PathTaperY S8 } // -1 to 1, quanta = 0.01 + { PathRevolutions U8 } // 0 to 3, quanta = 0.015 + { PathSkew S8 } // -1 to 1, quanta = 0.01 + { ProfileBegin U16 } // 0 to 1, quanta = 0.01 + { ProfileEnd U16 } // 0 to 1, quanta = 0.01 + { ProfileHollow U16 } // 0 to 1, quanta = 0.01 + } +} + +{ + ObjectExtraParams Low 99 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + ObjectData Variable + { ObjectLocalID U32 } + { ParamType U16 } + { ParamInUse BOOL } + { ParamSize U32 } + { ParamData Variable 1 } + } +} + + +// ObjectOwner +// To make public, set OwnerID to LLUUID::null. +// TODO: Eliminate god-bit. Maybe not. God-bit is ok, because it's +// known on the server. +{ + ObjectOwner Low 100 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + HeaderData Single + { Override BOOL } // BOOL, God-bit. + { OwnerID LLUUID } + { GroupID LLUUID } + } + { + ObjectData Variable + { ObjectLocalID U32 } + } +} + +// ObjectGroup +// To make the object part of no group, set GroupID = LLUUID::null. +// This call only works if objectid.ownerid == agentid. +{ + ObjectGroup Low 101 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + { GroupID LLUUID } + } + { + ObjectData Variable + { ObjectLocalID U32 } + } +} + +// Attempt to buy an object. This will only pack root objects. +{ + ObjectBuy Low 102 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + { GroupID LLUUID } + { CategoryID LLUUID } // folder where it goes (if derezed) + } + { + ObjectData Variable + { ObjectLocalID U32 } + { SaleType U8 } // U8 -> EForSale + { SalePrice S32 } + } +} + +// viewer -> simulator + +// buy object inventory. If the transaction succeeds, it will add +// inventory to the agent, and potentially remove the original. +{ + BuyObjectInventory Low 103 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + Data Single + { ObjectID LLUUID } + { ItemID LLUUID } + { FolderID LLUUID } + } +} + +// sim -> viewer +// Used to propperly handle buying asset containers +{ + DerezContainer Low 104 Trusted Zerocoded + { + Data Single + { ObjectID LLUUID } + { Delete BOOL } // BOOL + } +} + +// ObjectPermissions +// Field - see llpermissionsflags.h +// If Set is true, tries to turn on bits in mask. +// If set is false, tries to turn off bits in mask. +// BUG: This just forces the permissions field. +{ + ObjectPermissions Low 105 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + HeaderData Single + { Override BOOL } // BOOL, God-bit. + } + { + ObjectData Variable + { ObjectLocalID U32 } + { Field U8 } + { Set U8 } + { Mask U32 } + } +} + +// set object sale information +{ + ObjectSaleInfo Low 106 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + ObjectData Variable + { LocalID U32 } + { SaleType U8 } // U8 -> EForSale + { SalePrice S32 } + } +} + + +// set object names +{ + ObjectName Low 107 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + ObjectData Variable + { LocalID U32 } + { Name Variable 1 } + } +} + +// set object descriptions +{ + ObjectDescription Low 108 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + ObjectData Variable + { LocalID U32 } + { Description Variable 1 } + } +} + +// set object category +{ + ObjectCategory Low 109 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + ObjectData Variable + { LocalID U32 } + { Category U32 } + } +} + +// ObjectSelect +// Variable object data because rectangular selection can +// generate a large list very quickly. +{ + ObjectSelect Low 110 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + ObjectData Variable + { ObjectLocalID U32 } + } + +} + + +// ObjectDeselect +{ + ObjectDeselect Low 111 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + ObjectData Variable + { ObjectLocalID U32 } + } + +} + +// ObjectAttach +{ + ObjectAttach Low 112 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + { AttachmentPoint U8 } + } + { + ObjectData Variable + { ObjectLocalID U32 } + { Rotation LLQuaternion } + } +} + +// ObjectDetach -- derezzes an attachment, marking its item in your inventory as not "(worn)" +{ + ObjectDetach Low 113 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + ObjectData Variable + { ObjectLocalID U32 } + } +} + + +// ObjectDrop -- drops an attachment from your avatar onto the ground +{ + ObjectDrop Low 114 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + ObjectData Variable + { ObjectLocalID U32 } + } +} + + +// ObjectLink +{ + ObjectLink Low 115 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + ObjectData Variable + { ObjectLocalID U32 } + } +} + +// ObjectDelink +{ + ObjectDelink Low 116 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + ObjectData Variable + { ObjectLocalID U32 } + } +} + + +// ObjectGrab +{ + ObjectGrab Low 117 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + ObjectData Single + { LocalID U32 } + { GrabOffset LLVector3 } + } + { + SurfaceInfo Variable + { UVCoord LLVector3 } + { STCoord LLVector3 } + { FaceIndex S32 } + { Position LLVector3 } + { Normal LLVector3 } + { Binormal LLVector3 } + } +} + + +// ObjectGrabUpdate +// TODO: Quantize this data, reduce message size. +// TimeSinceLast could go to 1 byte, since capped +// at 100 on sim. +{ + ObjectGrabUpdate Low 118 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + ObjectData Single + { ObjectID LLUUID } + { GrabOffsetInitial LLVector3 } // LLVector3 + { GrabPosition LLVector3 } // LLVector3, region local + { TimeSinceLast U32 } + } + { + SurfaceInfo Variable + { UVCoord LLVector3 } + { STCoord LLVector3 } + { FaceIndex S32 } + { Position LLVector3 } + { Normal LLVector3 } + { Binormal LLVector3 } + } + +} + + +// ObjectDeGrab +{ + ObjectDeGrab Low 119 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + ObjectData Single + { LocalID U32 } + } + { + SurfaceInfo Variable + { UVCoord LLVector3 } + { STCoord LLVector3 } + { FaceIndex S32 } + { Position LLVector3 } + { Normal LLVector3 } + { Binormal LLVector3 } + } +} + + +// ObjectSpinStart +{ + ObjectSpinStart Low 120 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + ObjectData Single + { ObjectID LLUUID } + } +} + + +// ObjectSpinUpdate +{ + ObjectSpinUpdate Low 121 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + ObjectData Single + { ObjectID LLUUID } + { Rotation LLQuaternion } + } +} + + +// ObjectSpinStop +{ + ObjectSpinStop Low 122 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + ObjectData Single + { ObjectID LLUUID } + } +} + +// Export selected objects +// viewer->sim +{ + ObjectExportSelected Low 123 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { RequestID LLUUID } + { VolumeDetail S16 } + } + { + ObjectData Variable + { ObjectID LLUUID } + } +} + + +// ModifyLand - sent to modify a piece of land on a simulator. +// viewer -> sim +{ + ModifyLand Low 124 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + ModifyBlock Single + { Action U8 } + { BrushSize U8 } + { Seconds F32 } + { Height F32 } + } + { + ParcelData Variable + { LocalID S32 } + { West F32 } + { South F32 } + { East F32 } + { North F32 } + } + { + ModifyBlockExtended Variable + { BrushSize F32 } + } +} + + +// VelocityInterpolateOn +// viewer->sim +// requires administrative access +{ + VelocityInterpolateOn Low 125 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } +} + + +// VelocityInterpolateOff +// viewer->sim +// requires administrative access +{ + VelocityInterpolateOff Low 126 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } +} + +// Save State +// viewer->sim +// requires administrative access +{ + StateSave Low 127 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + DataBlock Single + { Filename Variable 1 } + } +} + +// ReportAutosaveCrash +// sim->launcher +{ + ReportAutosaveCrash Low 128 NotTrusted Unencoded + { + AutosaveData Single + { PID S32 } + { Status S32 } + } +} + +// SimWideDeletes +{ + SimWideDeletes Low 129 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + DataBlock Single + { TargetID LLUUID } + { Flags U32 } + } +} + +// RequestObjectPropertiesFamily +// Ask for extended information, such as creator, permissions, resources, etc. +// Medium frequency because it is driven by mouse hovering over objects, which +// occurs at high rates. +{ + RequestObjectPropertiesFamily Medium 5 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + ObjectData Single + { RequestFlags U32 } + { ObjectID LLUUID } + } +} + + +// Track agent - this information is used when sending out the +// coarse location update so that we know who you are tracking. +// To stop tracking - send a null uuid as the prey. +{ + TrackAgent Low 130 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + TargetData Single + { PreyID LLUUID } + } +} + +// end viewer to simulator section + +{ + ViewerStats Low 131 NotTrusted Zerocoded UDPDeprecated + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + { IP IPADDR } + { StartTime U32 } + { RunTime F32 } // F32 + { SimFPS F32 } // F32 + { FPS F32 } // F32 + { AgentsInView U8 } // + { Ping F32 } // F32 + { MetersTraveled F64 } + { RegionsVisited S32 } + { SysRAM U32 } + { SysOS Variable 1 } // String + { SysCPU Variable 1 } // String + { SysGPU Variable 1 } // String + } + + { + DownloadTotals Single + { World U32 } + { Objects U32 } + { Textures U32 } + } + + { + NetStats Multiple 2 + { Bytes U32 } + { Packets U32 } + { Compressed U32 } + { Savings U32 } + } + + { + FailStats Single + { SendPacket U32 } + { Dropped U32 } + { Resent U32 } + { FailedResends U32 } + { OffCircuit U32 } + { Invalid U32 } + } + + { + MiscStats Variable + { Type U32 } + { Value F64 } + } +} + +// ScriptAnswerYes +// reliable +{ + ScriptAnswerYes Low 132 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + Data Single + { TaskID LLUUID } + { ItemID LLUUID } + { Questions S32 } + } +} + + +// complaint/bug-report +// reliable +{ + UserReport Low 133 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + ReportData Single + { ReportType U8 } // BUG=1, COMPLAINT=2 + { Category U8 } // see sequence.user_report_category + { Position LLVector3 } // screenshot position, region-local + { CheckFlags U8 } // checkboxflags + { ScreenshotID LLUUID } + { ObjectID LLUUID } + { AbuserID LLUUID } + { AbuseRegionName Variable 1 } + { AbuseRegionID LLUUID } + { Summary Variable 1 } + { Details Variable 2 } + { VersionString Variable 1 } + } +} + + +// *************************************************************************** +// Simulator to Viewer Messages +// *************************************************************************** + +// AlertMessage +// Specifies the text to be posted in an alert dialog +{ + AlertMessage Low 134 Trusted Unencoded + { + AlertData Single + { Message Variable 1 } + } + { + AlertInfo Variable + { Message Variable 1 } + { ExtraParams Variable 1 } + } + { + AgentInfo Variable + { AgentID LLUUID } + } +} + +// Send an AlertMessage to the named agent. +// usually dataserver->simulator +{ + AgentAlertMessage Low 135 Trusted Unencoded + { + AgentData Single + { AgentID LLUUID } + } + { + AlertData Single + { Modal BOOL } + { Message Variable 1 } + } +} + + +// MeanCollisionAlert +// Specifies the text to be posted in an alert dialog +{ + MeanCollisionAlert Low 136 Trusted Zerocoded + { + MeanCollision Variable + { Victim LLUUID } + { Perp LLUUID } + { Time U32 } + { Mag F32 } + { Type U8 } + } +} + +// ViewerFrozenMessage +// Specifies the text to be posted in an alert dialog +{ + ViewerFrozenMessage Low 137 Trusted Unencoded + { + FrozenData Single + { Data BOOL } + } +} + +// Health Message +// Tells viewer what agent health is +{ + HealthMessage Low 138 Trusted Zerocoded + { + HealthData Single + { Health F32 } + } +} + +// ChatFromSimulator +// Chat text to appear on a user's screen +// Position is region local. +// Viewer can optionally use position to animate +// If audible is CHAT_NOT_AUDIBLE, message will not be valid +{ + ChatFromSimulator Low 139 Trusted Unencoded + { + ChatData Single + { FromName Variable 1 } + { SourceID LLUUID } // agent id or object id + { OwnerID LLUUID } // object's owner + { SourceType U8 } + { ChatType U8 } + { Audible U8 } + { Position LLVector3 } + { Message Variable 2 } // UTF-8 text + } +} + + +// Simulator statistics packet (goes out to viewer and dataserver/spaceserver) +{ + SimStats Low 140 Trusted Unencoded + { + Region Single + { RegionX U32 } + { RegionY U32 } + { RegionFlags U32 } + { ObjectCapacity U32 } + } + { + Stat Variable + { StatID U32 } + { StatValue F32 } + } + { + PidStat Single + { PID S32 } + } + { + RegionInfo Variable + { RegionFlagsExtended U64 } + } +} + +// viewer -> sim +// reliable +{ + RequestRegionInfo Low 141 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } +} + +// RegionInfo +// Used to populate UI for both region/estate floater +// and god tools floater +// sim -> viewer +// reliable +{ + RegionInfo Low 142 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + RegionInfo Single + { SimName Variable 1 } // string + { EstateID U32 } + { ParentEstateID U32 } + { RegionFlags U32 } + { SimAccess U8 } + { MaxAgents U8 } + { BillableFactor F32 } + { ObjectBonusFactor F32 } + { WaterHeight F32 } + { TerrainRaiseLimit F32 } + { TerrainLowerLimit F32 } + { PricePerMeter S32 } + { RedirectGridX S32 } + { RedirectGridY S32 } + { UseEstateSun BOOL } + { SunHour F32 } // last value set by estate or region controls JC + } + { + RegionInfo2 Single + { ProductSKU Variable 1 } // string + { ProductName Variable 1 } // string + { MaxAgents32 U32 } // Identical to RegionInfo.MaxAgents but allows greater range + { HardMaxAgents U32 } + { HardMaxObjects U32 } + } + { + RegionInfo3 Variable + { RegionFlagsExtended U64 } + } +} + +// GodUpdateRegionInfo +// Sent from viewer to sim after a god has changed some +// of the parameters in the god tools floater +// viewer -> sim +// reliable +{ + GodUpdateRegionInfo Low 143 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + RegionInfo Single + { SimName Variable 1 } // string + { EstateID U32 } + { ParentEstateID U32 } + { RegionFlags U32 } + { BillableFactor F32 } + { PricePerMeter S32 } + { RedirectGridX S32 } + { RedirectGridY S32 } + } + { + RegionInfo2 Variable + { RegionFlagsExtended U64 } + } +} + +//NearestLandingRegionRequest +//sim->dataserver +//Sent from the region to the data server +//to request the most up to date region for the requesting +//region to redirect teleports to +{ + NearestLandingRegionRequest Low 144 Trusted Unencoded + { + RequestingRegionData Single + { RegionHandle U64 } + } +} + +//NearestLandingPointReply +//dataserver->sim +//Sent from the data server to a region in reply +//to the redirectregion request stating which region +//the requesting region should redirect teleports to if necessary +{ + NearestLandingRegionReply Low 145 Trusted Unencoded + { + LandingRegionData Single + { RegionHandle U64 } + } +} + +//NearestLandingPointUpdated +//sim->dataserver +//Sent from a region to the data server +//to have the dataserver note/clear in the db +//that the region has updated it's nearest landing point +{ + NearestLandingRegionUpdated Low 146 Trusted Unencoded + { + RegionData Single + { RegionHandle U64 } + } +} + + +//TeleportLandingStatusChanged +//sim->dataserver +//Sent from the region to the data server +//to note that the region's teleportation landing status has changed +{ + TeleportLandingStatusChanged Low 147 Trusted Unencoded + { + RegionData Single + { RegionHandle U64 } + } +} + +// RegionHandshake +// Sent by region to viewer after it has received UseCircuitCode +// from that viewer. +// sim -> viewer +// reliable +{ + RegionHandshake Low 148 Trusted Zerocoded + { + RegionInfo Single + { RegionFlags U32 } + { SimAccess U8 } + { SimName Variable 1 } // string + { SimOwner LLUUID } + { IsEstateManager BOOL } // this agent, for this sim + { WaterHeight F32 } + { BillableFactor F32 } + { CacheID LLUUID } + { TerrainBase0 LLUUID } + { TerrainBase1 LLUUID } + { TerrainBase2 LLUUID } + { TerrainBase3 LLUUID } + { TerrainDetail0 LLUUID } + { TerrainDetail1 LLUUID } + { TerrainDetail2 LLUUID } + { TerrainDetail3 LLUUID } + { TerrainStartHeight00 F32 } + { TerrainStartHeight01 F32 } + { TerrainStartHeight10 F32 } + { TerrainStartHeight11 F32 } + { TerrainHeightRange00 F32 } + { TerrainHeightRange01 F32 } + { TerrainHeightRange10 F32 } + { TerrainHeightRange11 F32 } + } + { + RegionInfo2 Single + { RegionID LLUUID } + } + { + RegionInfo3 Single + { CPUClassID S32 } + { CPURatio S32 } + { ColoName Variable 1 } // string + { ProductSKU Variable 1 } // string + { ProductName Variable 1 } // string + } + { + RegionInfo4 Variable + { RegionFlagsExtended U64 } + { RegionProtocols U64 } + } +} + +// RegionHandshakeReply +// viewer -> sim +// reliable +// Sent after viewer has initialized the (pre-existing) +// LLViewerRegion with the name, access level, etc. and +// has loaded the cache for the region. +// After the simulator receives this, it will start sending +// data about objects. +{ + RegionHandshakeReply Low 149 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + RegionInfo Single + { Flags U32 } + } +} + +// The CoarseLocationUpdate message is sent to notify the viewer of +// the location of mappable objects in the region. 1 meter resolution is +// sufficient for this. The index block is used to show where you are, +// and where someone you are tracking is located. They are -1 if not +// applicable. +{ + CoarseLocationUpdate Medium 6 Trusted Unencoded + { + Location Variable + { X U8 } + { Y U8 } + { Z U8 } // Z in meters / 4 + } + { + Index Single + { You S16 } + { Prey S16 } + } + { + AgentData Variable + { AgentID LLUUID } + } +} + +// ImageData - sent to viewer to transmit information about an image +{ + ImageData High 9 Trusted Unencoded + { + ImageID Single + { ID LLUUID } + { Codec U8 } + { Size U32 } + { Packets U16 } + } + { + ImageData Single + { Data Variable 2 } + } +} + +// ImagePacket - follow on image data for images having > 1 packet of data +{ + ImagePacket High 10 Trusted Unencoded + { + ImageID Single + { ID LLUUID } + { Packet U16 } + } + { + ImageData Single + { Data Variable 2 } + } +} + +// LayerData - Sent to viewer - encodes layer data + +{ + LayerData High 11 Trusted Unencoded + { + LayerID Single + { Type U8 } + + } + { + LayerData Single + { Data Variable 2 } + } +} + +// ObjectUpdate - Sent by objects from the simulator to the viewer +// +// If only one ImageID is sent for an object type that has more than +// one face, the same image is repeated on each subsequent face. +// +// NameValue is a list of name-value strings, separated by \n characters, +// terminated by \0 +// +// Data is type-specific opaque data for this object +{ + ObjectUpdate High 12 Trusted Zerocoded + { + RegionData Single + { RegionHandle U64 } + { TimeDilation U16 } + } + { + ObjectData Variable + { ID U32 } + { State U8 } + + { FullID LLUUID } + { CRC U32 } // TEMPORARY HACK FOR JAMES + { PCode U8 } + { Material U8 } + { ClickAction U8 } + { Scale LLVector3 } + { ObjectData Variable 1 } + + { ParentID U32 } + { UpdateFlags U32 } // U32, see object_flags.h + + { PathCurve U8 } + { ProfileCurve U8 } + { PathBegin U16 } // 0 to 1, quanta = 0.01 + { PathEnd U16 } // 0 to 1, quanta = 0.01 + { PathScaleX U8 } // 0 to 1, quanta = 0.01 + { PathScaleY U8 } // 0 to 1, quanta = 0.01 + { PathShearX U8 } // -.5 to .5, quanta = 0.01 + { PathShearY U8 } // -.5 to .5, quanta = 0.01 + { PathTwist S8 } // -1 to 1, quanta = 0.01 + { PathTwistBegin S8 } // -1 to 1, quanta = 0.01 + { PathRadiusOffset S8 } // -1 to 1, quanta = 0.01 + { PathTaperX S8 } // -1 to 1, quanta = 0.01 + { PathTaperY S8 } // -1 to 1, quanta = 0.01 + { PathRevolutions U8 } // 0 to 3, quanta = 0.015 + { PathSkew S8 } // -1 to 1, quanta = 0.01 + { ProfileBegin U16 } // 0 to 1, quanta = 0.01 + { ProfileEnd U16 } // 0 to 1, quanta = 0.01 + { ProfileHollow U16 } // 0 to 1, quanta = 0.01 + + { TextureEntry Variable 2 } + { TextureAnim Variable 1 } + + { NameValue Variable 2 } + { Data Variable 2 } + { Text Variable 1 } // llSetText() hovering text + { TextColor Fixed 4 } // actually, a LLColor4U + { MediaURL Variable 1 } // URL for web page, movie, etc. + + // Info for particle systems + { PSBlock Variable 1 } + + // Extra parameters + { ExtraParams Variable 1 } + + // info for looped attached sounds + // because these are almost always all zero + // the hit after zero-coding is only 2 bytes + // not the 42 you see here + { Sound LLUUID } + { OwnerID LLUUID } // HACK object's owner id, only set if non-null sound, for muting + { Gain F32 } + { Flags U8 } + { Radius F32 } // cutoff radius + + // joint info -- is sent in the update of each joint-child-root + { JointType U8 } + { JointPivot LLVector3 } + { JointAxisOrAnchor LLVector3 } + } +} + + +// ObjectUpdateCompressed +{ + ObjectUpdateCompressed High 13 Trusted Unencoded + { + RegionData Single + { RegionHandle U64 } + { TimeDilation U16 } + } + { + ObjectData Variable + { UpdateFlags U32 } + { Data Variable 2 } + } +} + +// ObjectUpdateCached +// reliable +{ + ObjectUpdateCached High 14 Trusted Unencoded + { + RegionData Single + { RegionHandle U64 } + { TimeDilation U16 } + } + { + ObjectData Variable + { ID U32 } + { CRC U32 } + { UpdateFlags U32 } + } +} + +// packed terse object update format +{ + ImprovedTerseObjectUpdate High 15 Trusted Unencoded + { + RegionData Single + { RegionHandle U64 } + { TimeDilation U16 } + } + { + ObjectData Variable + { Data Variable 1 } + { TextureEntry Variable 2 } + } +} + +// KillObject - Sent by objects to the viewer to tell them to kill themselves + +{ + KillObject High 16 Trusted Unencoded + { + ObjectData Variable + { ID U32 } + } +} + + +// CrossedRegion - new way to tell a viewer it has gone across a region +// boundary +{ + CrossedRegion Medium 7 Trusted Unencoded UDPBlackListed + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + RegionData Single + { SimIP IPADDR } + { SimPort IPPORT } + { RegionHandle U64 } + { SeedCapability Variable 2 } // URL + } + { + Info Single + { Position LLVector3 } + { LookAt LLVector3 } + } +} + +// SimulatorViewerTimeMessage - Allows viewer to resynch to world time + +{ + SimulatorViewerTimeMessage Low 150 Trusted Unencoded + { + TimeInfo Single + { UsecSinceStart U64 } + { SecPerDay U32 } + { SecPerYear U32 } + { SunDirection LLVector3 } + { SunPhase F32 } + { SunAngVelocity LLVector3 } + } +} + +// EnableSimulator - Preps a viewer to receive data from a simulator + +{ + EnableSimulator Low 151 Trusted Unencoded UDPBlackListed + { + SimulatorInfo Single + { Handle U64 } + { IP IPADDR } + { Port IPPORT } + } +} + +// DisableThisSimulator - Tells a viewer not to expect data from this simulator anymore + +{ + DisableSimulator Low 152 Trusted Unencoded +} + +// ConfirmEnableSimulator - A confirmation message sent from simulator to neighbors that the simulator +// has successfully been enabled by the viewer + +{ + ConfirmEnableSimulator Medium 8 Trusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } +} + +//----------------------------------------------------------------------------- +// New Transfer system +//----------------------------------------------------------------------------- + +// Request a new transfer (target->source) +{ + TransferRequest Low 153 NotTrusted Zerocoded + { + TransferInfo Single + { TransferID LLUUID } + { ChannelType S32 } + { SourceType S32 } + { Priority F32 } + { Params Variable 2 } + } +} + +// Return info about a transfer/initiate transfer (source->target) +// Possibly should have a Params field like above +{ + TransferInfo Low 154 NotTrusted Zerocoded + { + TransferInfo Single + { TransferID LLUUID } + { ChannelType S32 } + { TargetType S32 } + { Status S32 } + { Size S32 } + { Params Variable 2 } + } +} + +{ + TransferPacket High 17 NotTrusted Unencoded + { + TransferData Single + { TransferID LLUUID } + { ChannelType S32 } + { Packet S32 } + { Status S32 } + { Data Variable 2 } + } +} + +// Abort a transfer in progress (either from target->source or source->target) +{ + TransferAbort Low 155 NotTrusted Zerocoded + { + TransferInfo Single + { TransferID LLUUID } + { ChannelType S32 } + } +} + + +//----------------------------------------------------------------------------- +// General file transfer +//----------------------------------------------------------------------------- + +// RequestXfer - request an arbitrary xfer +{ + RequestXfer Low 156 NotTrusted Zerocoded + { + XferID Single + { ID U64 } + { Filename Variable 1 } + { FilePath U8 } // ELLPath + { DeleteOnCompletion BOOL } // BOOL + { UseBigPackets BOOL } // BOOL + { VFileID LLUUID } + { VFileType S16 } + } +} + +// SendXferPacket - send an additional packet of an arbitrary xfer from sim -> viewer +{ + SendXferPacket High 18 NotTrusted Unencoded + { + XferID Single + { ID U64 } + { Packet U32 } + } + { + DataPacket Single + { Data Variable 2 } + } +} + +// ConfirmXferPacket +{ + ConfirmXferPacket High 19 NotTrusted Unencoded + { + XferID Single + { ID U64 } + { Packet U32 } + } +} + +// AbortXfer +{ + AbortXfer Low 157 NotTrusted Unencoded + { + XferID Single + { ID U64 } + { Result S32 } + } +} + +//----------------------------------------------------------------------------- +// Avatar information +//----------------------------------------------------------------------------- + + +// AvatarAnimation - Update animation state +// simulator --> viewer +{ + AvatarAnimation High 20 Trusted Unencoded + { + Sender Single + { ID LLUUID } + } + { + AnimationList Variable + { AnimID LLUUID } + { AnimSequenceID S32 } + } + { + AnimationSourceList Variable + { ObjectID LLUUID } + } + { + PhysicalAvatarEventList Variable + { TypeData Variable 1 } + } + +} + +// AvatarAppearance - Update visual params +{ + AvatarAppearance Low 158 Trusted Zerocoded + { + Sender Single + { ID LLUUID } + { IsTrial BOOL } + } + { + ObjectData Single + { TextureEntry Variable 2 } + } + { + VisualParam Variable + { ParamValue U8 } + } + { + AppearanceData Variable + { AppearanceVersion U8 } + { CofVersion S32 } + { Flags U32 } + } + { + AppearanceHover Variable + { HoverHeight LLVector3 } + } +} + +// AvatarSitResponse - response to a request to sit on an object +{ + AvatarSitResponse High 21 Trusted Zerocoded + { + SitObject Single + { ID LLUUID } + } + { + SitTransform Single + { AutoPilot BOOL } + { SitPosition LLVector3 } + { SitRotation LLQuaternion } + { CameraEyeOffset LLVector3 } + { CameraAtOffset LLVector3 } + { ForceMouselook BOOL } + } +} + +// SetFollowCamProperties +{ + SetFollowCamProperties Low 159 Trusted Unencoded + { + ObjectData Single + { ObjectID LLUUID } + } + { + CameraProperty Variable + { Type S32 } + { Value F32 } + } +} + +// ClearFollowCamProperties +{ + ClearFollowCamProperties Low 160 Trusted Unencoded + { + ObjectData Single + { ObjectID LLUUID } + } +} + +// CameraConstraint - new camera distance limit (based on collision with objects) +{ + CameraConstraint High 22 Trusted Zerocoded + { + CameraCollidePlane Single + { Plane LLVector4 } + } +} + +// ObjectProperties +// Extended information such as creator, permissions, etc. +// Medium because potentially driven by mouse hover events. +{ + ObjectProperties Medium 9 Trusted Zerocoded + { + ObjectData Variable + { ObjectID LLUUID } + { CreatorID LLUUID } + { OwnerID LLUUID } + { GroupID LLUUID } + { CreationDate U64 } + { BaseMask U32 } + { OwnerMask U32 } + { GroupMask U32 } + { EveryoneMask U32 } + { NextOwnerMask U32 } + { OwnershipCost S32 } +// { TaxRate F32 } // F32 + { SaleType U8 } // U8 -> EForSale + { SalePrice S32 } + { AggregatePerms U8 } + { AggregatePermTextures U8 } + { AggregatePermTexturesOwner U8 } + { Category U32 } // LLCategory + { InventorySerial S16 } // S16 + { ItemID LLUUID } + { FolderID LLUUID } + { FromTaskID LLUUID } + { LastOwnerID LLUUID } + { Name Variable 1 } + { Description Variable 1 } + { TouchName Variable 1 } + { SitName Variable 1 } + { TextureID Variable 1 } + } +} + +// ObjectPropertiesFamily +// Medium because potentially driven by mouse hover events. +{ + ObjectPropertiesFamily Medium 10 Trusted Zerocoded + { + ObjectData Single + { RequestFlags U32 } + { ObjectID LLUUID } + { OwnerID LLUUID } + { GroupID LLUUID } + { BaseMask U32 } + { OwnerMask U32 } + { GroupMask U32 } + { EveryoneMask U32 } + { NextOwnerMask U32 } + { OwnershipCost S32 } + { SaleType U8 } // U8 -> EForSale + { SalePrice S32 } + { Category U32 } // LLCategory + { LastOwnerID LLUUID } + { Name Variable 1 } + { Description Variable 1 } + } +} + +// RequestPayPrice +// viewer -> sim +{ + RequestPayPrice Low 161 NotTrusted Unencoded + { + ObjectData Single + { ObjectID LLUUID } + } +} + +// PayPriceReply +// sim -> viewer +{ + PayPriceReply Low 162 Trusted Unencoded + { + ObjectData Single + { ObjectID LLUUID } + { DefaultPayPrice S32 } + } + { + ButtonData Variable + + { PayButton S32 } + } +} + +// KickUser +// *FIXME* +// Kick off a logged-in user, such as when two people log in with the +// same account name. +// ROUTED dataserver -> userserver -> spaceserver -> simulator -> viewer +// reliable, but that may not matter if a system component is quitting +{ + KickUser Low 163 Trusted Unencoded + { + TargetBlock Single + { TargetIP IPADDR } // U32 encoded IP + { TargetPort IPPORT } + } + { + UserInfo Single + { AgentID LLUUID } + { SessionID LLUUID } + { Reason Variable 2 } // string + } +} + +// ack sent from the simulator up to the main database so that login +// can continue. +{ + KickUserAck Low 164 Trusted Unencoded + { + UserInfo Single + { SessionID LLUUID } + { Flags U32 } + } +} + +// GodKickUser +// When a god wants someone kicked +// viewer -> sim +// reliable +{ + GodKickUser Low 165 NotTrusted Unencoded + { + UserInfo Single + { GodID LLUUID } + { GodSessionID LLUUID } + { AgentID LLUUID } + { KickFlags U32 } + { Reason Variable 2 } // string + } +} + +// SystemKickUser +// user->space, reliable +{ + SystemKickUser Low 166 Trusted Unencoded + { + AgentInfo Variable + { AgentID LLUUID } + } +} + +// EjectUser +// viewer -> sim +// reliable +{ + EjectUser Low 167 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + Data Single + { TargetID LLUUID } + { Flags U32 } + } +} + +// FreezeUser +// Freeze someone who is on my land. +// viewer -> sim +// reliable +{ + FreezeUser Low 168 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + Data Single + { TargetID LLUUID } + { Flags U32 } + } +} + + +// AvatarPropertiesRequest +// viewer -> simulator +// reliable +{ + AvatarPropertiesRequest Low 169 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + { AvatarID LLUUID } + } +} + +// AvatarPropertiesRequestBackend +// simulator -> dataserver +// reliable +{ + AvatarPropertiesRequestBackend Low 170 Trusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { AvatarID LLUUID } + { GodLevel U8 } + { WebProfilesDisabled BOOL } + } +} +// AvatarPropertiesReply +// dataserver -> simulator +// simulator -> viewer +// reliable +{ + AvatarPropertiesReply Low 171 Trusted Zerocoded + { + AgentData Single + { AgentID LLUUID } // your id + { AvatarID LLUUID } // avatar you're asking about + } + { + PropertiesData Single + { ImageID LLUUID } + { FLImageID LLUUID } + { PartnerID LLUUID } + { AboutText Variable 2 } // string, up to 512 + { FLAboutText Variable 1 } // string + { BornOn Variable 1 } // string + { ProfileURL Variable 1 } // string + { CharterMember Variable 1 } // special - usually U8 + { Flags U32 } + } +} + +{ + AvatarInterestsReply Low 172 Trusted Zerocoded + { + AgentData Single + { AgentID LLUUID } // your id + { AvatarID LLUUID } // avatar you're asking about + } + { + PropertiesData Single + { WantToMask U32 } + { WantToText Variable 1 } // string + { SkillsMask U32 } + { SkillsText Variable 1 } // string + { LanguagesText Variable 1 } // string + } +} + +// AvatarGroupsReply +// dataserver -> simulator +// simulator -> viewer +// reliable +{ + AvatarGroupsReply Low 173 Trusted Zerocoded + { + AgentData Single + { AgentID LLUUID } // your id + { AvatarID LLUUID } // avatar you're asking about + } + { + GroupData Variable + { GroupPowers U64 } + { AcceptNotices BOOL } + { GroupTitle Variable 1 } + { GroupID LLUUID } + { GroupName Variable 1 } + { GroupInsigniaID LLUUID } + } + { + NewGroupData Single + { ListInProfile BOOL } // whether group displays in profile + } +} + + +// AvatarPropertiesUpdate +// viewer -> simulator +// reliable +{ + AvatarPropertiesUpdate Low 174 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + PropertiesData Single + { ImageID LLUUID } + { FLImageID LLUUID } + { AboutText Variable 2 } // string, up to 512 + { FLAboutText Variable 1 } + { AllowPublish BOOL } // whether profile is externally visible or not + { MaturePublish BOOL } // profile is "mature" + { ProfileURL Variable 1 } // string + } +} + +// AvatarInterestsUpdate +// viewer -> simulator +// reliable +{ + AvatarInterestsUpdate Low 175 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + PropertiesData Single + { WantToMask U32 } + { WantToText Variable 1 } // string + { SkillsMask U32 } + { SkillsText Variable 1 } // string + { LanguagesText Variable 1 } // string + } +} + + + +// AvatarNotesReply +// dataserver -> simulator +// simulator -> viewer +// reliable +{ + AvatarNotesReply Low 176 Trusted Unencoded + { + AgentData Single + { AgentID LLUUID } + } + { + Data Single + { TargetID LLUUID } + { Notes Variable 2 } // string + } +} + + +// AvatarNotesUpdate +// viewer -> simulator -> dataserver +// reliable +{ + AvatarNotesUpdate Low 177 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + Data Single + { TargetID LLUUID } + { Notes Variable 2 } // string + } +} + + +// AvatarPicksReply +// dataserver -> simulator -> viewer +// Send the header information for this avatar's picks +// This fills in the tabs of the Picks panel. +// reliable +{ + AvatarPicksReply Low 178 Trusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { TargetID LLUUID } + } + { + Data Variable + { PickID LLUUID } + { PickName Variable 1 } // string + } +} + + +// EventInfoRequest +// viewer -> simulator +// simulator -> dataserver +// reliable +{ + EventInfoRequest Low 179 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + EventData Single + { EventID U32 } + } +} + + +// EventInfoReply +// dataserver -> simulator +// simulator -> viewer +// reliable +{ + EventInfoReply Low 180 Trusted Unencoded + { + AgentData Single + { AgentID LLUUID } + } + { + EventData Single + { EventID U32 } + { Creator Variable 1 } + { Name Variable 1 } + { Category Variable 1 } + { Desc Variable 2 } + { Date Variable 1 } + { DateUTC U32 } + { Duration U32 } + { Cover U32 } + { Amount U32 } + { SimName Variable 1 } + { GlobalPos LLVector3d } + { EventFlags U32 } + } +} + + +// EventNotificationAddRequest +// viewer -> simulator +// simulator -> dataserver +// reliable +{ + EventNotificationAddRequest Low 181 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + EventData Single + { EventID U32 } + } +} + + +// EventNotificationRemoveRequest +// viewer -> simulator +// simulator -> dataserver +// reliable +{ + EventNotificationRemoveRequest Low 182 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + EventData Single + { EventID U32 } + } +} + +// EventGodDelete +// viewer -> simulator +// simulator -> dataserver +// QueryData is used to resend a search result after the deletion +// reliable +{ + EventGodDelete Low 183 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + EventData Single + { EventID U32 } + } + { + QueryData Single + { QueryID LLUUID } + { QueryText Variable 1 } + { QueryFlags U32 } + { QueryStart S32 } // prev/next page support + } +} + + +// PickInfoReply +// dataserver -> simulator +// simulator -> viewer +// reliable +{ + PickInfoReply Low 184 Trusted Unencoded + { + AgentData Single + { AgentID LLUUID } + } + { + Data Single + { PickID LLUUID } + { CreatorID LLUUID } + { TopPick BOOL } + { ParcelID LLUUID } + { Name Variable 1 } + { Desc Variable 2 } + { SnapshotID LLUUID } + { User Variable 1 } + { OriginalName Variable 1 } + { SimName Variable 1 } + { PosGlobal LLVector3d } + { SortOrder S32 } + { Enabled BOOL } + } +} + + +// PickInfoUpdate +// Update a pick. ParcelID is set on the simulator as the message +// passes through. +// If TopPick is TRUE, the simulator will only pass on the message +// if the agent_id is a god. +// viewer -> simulator -> dataserver +// reliable +{ + PickInfoUpdate Low 185 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + Data Single + { PickID LLUUID } + { CreatorID LLUUID } + { TopPick BOOL } + { ParcelID LLUUID } + { Name Variable 1 } + { Desc Variable 2 } + { SnapshotID LLUUID } + { PosGlobal LLVector3d } + { SortOrder S32 } + { Enabled BOOL } + } +} + + +// PickDelete +// Delete a non-top pick from the database. +// viewer -> simulator -> dataserver +// reliable +{ + PickDelete Low 186 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + Data Single + { PickID LLUUID } + } +} + +// PickGodDelete +// Delete a pick from the database. +// QueryID is needed so database can send a repeat list of +// picks. +// viewer -> simulator -> dataserver +// reliable +{ + PickGodDelete Low 187 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + Data Single + { PickID LLUUID } + { QueryID LLUUID } + } +} + + +// ScriptQuestion +// reliable +{ + ScriptQuestion Low 188 Trusted Unencoded + { + Data Single + { TaskID LLUUID } + { ItemID LLUUID } + { ObjectName Variable 1 } + { ObjectOwner Variable 1 } + { Questions S32 } + } + { + Experience Single + { ExperienceID LLUUID } + } +} + +// ScriptControlChange +// reliable +{ + ScriptControlChange Low 189 Trusted Unencoded + { + Data Variable + { TakeControls BOOL } + { Controls U32 } + { PassToAgent BOOL } + } +} + +// ScriptDialog +// sim -> viewer +// reliable +{ + ScriptDialog Low 190 Trusted Zerocoded + { + Data Single + { ObjectID LLUUID } + { FirstName Variable 1 } + { LastName Variable 1 } + { ObjectName Variable 1 } + { Message Variable 2 } + { ChatChannel S32 } + { ImageID LLUUID } + } + { + Buttons Variable + { ButtonLabel Variable 1 } + } + { + OwnerData Variable + { OwnerID LLUUID } + } +} + + +// ScriptDialogReply +// viewer -> sim +// reliable +{ + ScriptDialogReply Low 191 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + Data Single + { ObjectID LLUUID } + { ChatChannel S32 } + { ButtonIndex S32 } + { ButtonLabel Variable 1 } + } +} + + +// ForceScriptControlRelease +// reliable +{ + ForceScriptControlRelease Low 192 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } +} + +// RevokePermissions +// reliable +{ + RevokePermissions Low 193 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + Data Single + { ObjectID LLUUID } + { ObjectPermissions U32 } + } +} + +// LoadURL +// sim -> viewer +// Ask the user if they would like to load a URL +// reliable +{ + LoadURL Low 194 Trusted Unencoded + { + Data Single + { ObjectName Variable 1 } + { ObjectID LLUUID } + { OwnerID LLUUID } + { OwnerIsGroup BOOL } + { Message Variable 1 } + { URL Variable 1 } + } +} + +// ScriptTeleportRequest +// reliable +{ + ScriptTeleportRequest Low 195 Trusted Unencoded + { + Data Single + { ObjectName Variable 1 } + { SimName Variable 1 } + { SimPosition LLVector3 } + { LookAt LLVector3 } + } +} + + + + +// *************************************************************************** +// Land Parcel system +// *************************************************************************** + +// ParcelOverlay +// We send N packets per region to the viewer. +// N = 4, currently. At 256x256 meter regions, 4x4 meter parcel grid, +// there are 4096 parcel units per region. At N = 4, that's 1024 units +// per packet, allowing 8 bit bytes. +// sim -> viewer +// reliable +{ + ParcelOverlay Low 196 Trusted Zerocoded + { + ParcelData Single + { SequenceID S32 } // 0...3, which piece of region + { Data Variable 2 } // packed bit-field, (grids*grids)/N + } +} + + +// ParcelPropertiesRequest +// SequenceID should be -1 or -2, and is echoed back in the +// parcel properties message. +// viewer -> sim +// reliable +{ + ParcelPropertiesRequest Medium 11 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + ParcelData Single + { SequenceID S32 } + { West F32 } + { South F32 } + { East F32 } + { North F32 } + { SnapSelection BOOL } + } +} + +// ParcelPropertiesRequestByID +// viewer -> sim +// reliable +{ + ParcelPropertiesRequestByID Low 197 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + ParcelData Single + { SequenceID S32 } + { LocalID S32 } + } +} + +// ParcelProperties +// sequence id = -1 for parcels that you explicitly selected +// For agents, sequence id increments every time the agent transits into +// a new parcel. It is used to detect out-of-order agent parcel info updates. +// Bitmap = packed bit field, one bit per parcel grid, on if that grid is +// part of the selected parcel. +// sim -> viewer +// WARNING: This packet is potentially large. With max length name, +// description, music URL and media URL, it is 1526 + sizeof ( LLUUID ) bytes. +{ + ParcelProperties High 23 Trusted Zerocoded UDPDeprecated + { + ParcelData Single + { RequestResult S32 } + { SequenceID S32 } + { SnapSelection BOOL } + { SelfCount S32 } + { OtherCount S32 } + { PublicCount S32 } + { LocalID S32 } + { OwnerID LLUUID } + { IsGroupOwned BOOL } + { AuctionID U32 } + { ClaimDate S32 } // time_t + { ClaimPrice S32 } + { RentPrice S32 } + { AABBMin LLVector3 } + { AABBMax LLVector3 } + { Bitmap Variable 2 } // packed bit-field + { Area S32 } + { Status U8 } // owned vs. pending + { SimWideMaxPrims S32 } + { SimWideTotalPrims S32 } + { MaxPrims S32 } + { TotalPrims S32 } + { OwnerPrims S32 } + { GroupPrims S32 } + { OtherPrims S32 } + { SelectedPrims S32 } + { ParcelPrimBonus F32 } + + { OtherCleanTime S32 } + + { ParcelFlags U32 } + { SalePrice S32 } + { Name Variable 1 } // string + { Desc Variable 1 } // string + { MusicURL Variable 1 } // string + { MediaURL Variable 1 } // string + { MediaID LLUUID } + { MediaAutoScale U8 } + { GroupID LLUUID } + { PassPrice S32 } + { PassHours F32 } + { Category U8 } + { AuthBuyerID LLUUID } + { SnapshotID LLUUID } + { UserLocation LLVector3 } + { UserLookAt LLVector3 } + { LandingType U8 } + { RegionPushOverride BOOL } + { RegionDenyAnonymous BOOL } + { RegionDenyIdentified BOOL } + { RegionDenyTransacted BOOL } + // in llsd message, SeeAVs, GroupAVSounds and AnyAVSounds BOOLs are also sent + } + { + AgeVerificationBlock Single + { RegionDenyAgeUnverified BOOL } + } + { + RegionAllowAccessBlock Single + { RegionAllowAccessOverride BOOL } + } +} + +// ParcelPropertiesUpdate +// viewer -> sim +// reliable +{ + ParcelPropertiesUpdate Low 198 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + ParcelData Single + { LocalID S32 } + { Flags U32 } + + { ParcelFlags U32 } + { SalePrice S32 } + { Name Variable 1 } // string + { Desc Variable 1 } // string + { MusicURL Variable 1 } // string + { MediaURL Variable 1 } // string + { MediaID LLUUID } + { MediaAutoScale U8 } + { GroupID LLUUID } + { PassPrice S32 } + { PassHours F32 } + { Category U8 } + { AuthBuyerID LLUUID } + { SnapshotID LLUUID } + { UserLocation LLVector3 } + { UserLookAt LLVector3 } + { LandingType U8 } + } +} + +// ParcelReturnObjects +// viewer -> sim +// reliable +{ + ParcelReturnObjects Low 199 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + ParcelData Single + { LocalID S32 } + { ReturnType U32 } + } + { + TaskIDs Variable + { TaskID LLUUID } + } + { + OwnerIDs Variable + { OwnerID LLUUID } + } +} + +// ParcelSetOtherCleanTime +// viewer -> sim +// reliable +{ + ParcelSetOtherCleanTime Low 200 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + ParcelData Single + { LocalID S32 } + { OtherCleanTime S32 } + } +} + + +// Disable makes objects nonphysical and turns off their scripts. +// ParcelDisableObjects +// viewer -> sim +// reliable +{ + ParcelDisableObjects Low 201 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + ParcelData Single + { LocalID S32 } + { ReturnType U32 } + } + { + TaskIDs Variable + { TaskID LLUUID } + } + { + OwnerIDs Variable + { OwnerID LLUUID } + } +} + + +// ParcelSelectObjects +// viewer -> sim +// reliable +{ + ParcelSelectObjects Low 202 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + ParcelData Single + { LocalID S32 } + { ReturnType U32 } + } + { + ReturnIDs Variable + { ReturnID LLUUID } + } +} + + +// EstateCovenantRequest +// viewer -> sim +// reliable +{ + EstateCovenantRequest Low 203 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } +} + +// EstateCovenantReply +// sim -> viewer +// reliable +{ + EstateCovenantReply Low 204 Trusted Unencoded + { + Data Single + { CovenantID LLUUID } + { CovenantTimestamp U32 } + { EstateName Variable 1 } // string + { EstateOwnerID LLUUID } + } +} + + +// ForceObjectSelect +// sim -> viewer +// reliable +{ + ForceObjectSelect Low 205 Trusted Unencoded + { + Header Single + { ResetList BOOL } + } + { + Data Variable + { LocalID U32 } + } +} + + +// ParcelBuyPass - purchase a temporary access pass +// viewer -> sim +// reliable +{ + ParcelBuyPass Low 206 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + ParcelData Single + { LocalID S32 } + } +} + +// ParcelDeedToGroup - deed a patch of land to a group +// viewer -> sim +// reliable +{ + ParcelDeedToGroup Low 207 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + Data Single + { GroupID LLUUID } + { LocalID S32 } // parcel id + } +} + +// reserved for when island owners force re-claim parcel +{ + ParcelReclaim Low 208 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + Data Single + { LocalID S32 } // parcel id + } +} + +// ParcelClaim - change the owner of a patch of land +// viewer -> sim +// reliable +{ + ParcelClaim Low 209 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + Data Single + { GroupID LLUUID } + { IsGroupOwned BOOL } + { Final BOOL } // true if buyer is in tier + } + { + ParcelData Variable + { West F32 } + { South F32 } + { East F32 } + { North F32 } + } +} + +// ParcelJoin - Take all parcels which are owned by agent and inside +// rectangle, and make them 1 parcel if they all are leased. +// viewer -> sim +// reliable +{ + ParcelJoin Low 210 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + ParcelData Single + { West F32 } + { South F32 } + { East F32 } + { North F32 } + } +} + +// ParcelDivide +// If the selection is a subsection of exactly one parcel, +// chop out that section and make a new parcel of it. +// viewer -> sim +// reliable +{ + ParcelDivide Low 211 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + ParcelData Single + { West F32 } + { South F32 } + { East F32 } + { North F32 } + } +} + +// ParcelRelease +// Release a parcel to public +// viewer -> sim +// reliable +{ + ParcelRelease Low 212 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + Data Single + { LocalID S32 } // parcel ID + } +} + +// ParcelBuy - change the owner of a patch of land. +// viewer -> sim +// reliable +{ + ParcelBuy Low 213 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + Data Single + { GroupID LLUUID } + { IsGroupOwned BOOL } + { RemoveContribution BOOL } + { LocalID S32 } + { Final BOOL } // true if buyer is in tier + } + { + ParcelData Single + { Price S32 } + { Area S32 } + } +} + + +// ParcelGodForceOwner Unencoded +{ + ParcelGodForceOwner Low 214 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + Data Single + { OwnerID LLUUID } + { LocalID S32 } // parcel ID + } +} + + +// viewer -> sim +// ParcelAccessListRequest +{ + ParcelAccessListRequest Low 215 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + Data Single + { SequenceID S32 } + { Flags U32 } + { LocalID S32 } + } +} + + +// sim -> viewer +// ParcelAccessListReply +{ + ParcelAccessListReply Low 216 Trusted Zerocoded + { + Data Single + { AgentID LLUUID } + { SequenceID S32 } + { Flags U32 } + { LocalID S32 } + } + { + List Variable + { ID LLUUID } + { Time S32 } // time_t + { Flags U32 } + } +} + +// viewer -> sim +// ParcelAccessListUpdate +{ + ParcelAccessListUpdate Low 217 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + Data Single + { Flags U32 } + { LocalID S32 } + { TransactionID LLUUID } + { SequenceID S32 } + { Sections S32 } + } + { + List Variable + { ID LLUUID } + { Time S32 } // time_t + { Flags U32 } + } +} + + +// viewer -> sim -> dataserver +// reliable +{ + ParcelDwellRequest Low 218 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + Data Single + { LocalID S32 } + { ParcelID LLUUID } // filled in on sim + } +} + + +// dataserver -> sim -> viewer +// reliable +{ + ParcelDwellReply Low 219 Trusted Unencoded + { + AgentData Single + { AgentID LLUUID } + } + { + Data Single + { LocalID S32 } + { ParcelID LLUUID } + { Dwell F32 } + } +} + +// sim -> dataserver +// This message is used to check if a user can buy a parcel. If +// successful, the transaction is approved through a money balance reply +// with the same transaction id. +{ + RequestParcelTransfer Low 220 Trusted Zerocoded + { + Data Single + { TransactionID LLUUID } + { TransactionTime U32 } // utc seconds since epoch + { SourceID LLUUID } + { DestID LLUUID } + { OwnerID LLUUID } + { Flags U8 } // see lltransactiontypes.h + { TransactionType S32 } // see lltransactiontypes.h + { Amount S32 } + { BillableArea S32 } + { ActualArea S32 } + { Final BOOL } // true if buyer should be in tier + } + { + RegionData Single // included so region name shows up in transaction logs + { RegionID LLUUID } + { GridX U32 } + { GridY U32 } + } +} + +// sim ->dataserver +// This message is used to send up complete parcel properties for +// persistance in the database. +// If you add something here, you should probably also change the +// simulator's database update query on startup. +{ + UpdateParcel Low 221 Trusted Zerocoded + { + ParcelData Single + { ParcelID LLUUID } + { RegionHandle U64 } + { OwnerID LLUUID } + { GroupOwned BOOL } + { Status U8 } + { Name Variable 1 } + { Description Variable 1 } + { MusicURL Variable 1 } + { RegionX F32 } + { RegionY F32 } + { ActualArea S32 } + { BillableArea S32 } + { ShowDir BOOL } + { IsForSale BOOL } + { Category U8 } + { SnapshotID LLUUID } + { UserLocation LLVector3 } + { SalePrice S32 } + { AuthorizedBuyerID LLUUID } + { AllowPublish BOOL } + { MaturePublish BOOL } + } +} + +// sim -> dataserver or space ->sim +// This message is used to tell the dataserver that a parcel has been +// removed. +{ + RemoveParcel Low 222 Trusted Unencoded + { + ParcelData Variable + { ParcelID LLUUID } + } +} + +// sim -> dataserver +// Merges some of the database information for parcels (dwell). +{ + MergeParcel Low 223 Trusted Unencoded + { + MasterParcelData Single + { MasterID LLUUID } + } + { + SlaveParcelData Variable + { SlaveID LLUUID } + } +} + +// sim -> dataserver +{ + LogParcelChanges Low 224 Trusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + } + { + RegionData Single + { RegionHandle U64 } + } + { + ParcelData Variable + { ParcelID LLUUID } + { OwnerID LLUUID } + { IsOwnerGroup BOOL } + { ActualArea S32 } + { Action S8 } + { TransactionID LLUUID } + } +} + +// sim -> dataserver +{ + CheckParcelSales Low 225 Trusted Unencoded + { + RegionData Variable + { RegionHandle U64 } + } +} + +// dataserver -> simulator +// tell a particular simulator to finish parcel sale. +{ + ParcelSales Low 226 Trusted Unencoded + { + ParcelData Variable + { ParcelID LLUUID } + { BuyerID LLUUID } + } +} + +// viewer -> sim +// mark parcel and double secret agent content on parcel as owned by +// governor/maint and adjusts permissions approriately. Godlike request. +{ + ParcelGodMarkAsContent Low 227 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + ParcelData Single + { LocalID S32 } + } +} + + +// viewer -> sim +// start an auction. viewer fills in the appropriate date, simulator +// validates and fills in the rest of the information to start an auction +// on a parcel. Processing currently requires that AgentID is a god. +{ + ViewerStartAuction Low 228 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + ParcelData Single + { LocalID S32 } + { SnapshotID LLUUID } + } +} + +// sim -> dataserver +// Once all of the data has been gathered, +{ + StartAuction Low 229 Trusted Unencoded + { + AgentData Single + { AgentID LLUUID } + } + { + ParcelData Single + { ParcelID LLUUID } + { SnapshotID LLUUID } + { Name Variable 1 } // string + } +} + +// dataserver -> sim +{ + ConfirmAuctionStart Low 230 Trusted Unencoded + { + AuctionData Single + { ParcelID LLUUID } + { AuctionID U32 } + } +} + +// sim -> dataserver +// Tell the dataserver that an auction has completed. +{ + CompleteAuction Low 231 Trusted Unencoded + { + ParcelData Variable + { ParcelID LLUUID } + } +} + +// Tell the dataserver that an auction has been canceled. +{ + CancelAuction Low 232 Trusted Unencoded + { + ParcelData Variable + { ParcelID LLUUID } + } +} + +// sim -> dataserver +{ + CheckParcelAuctions Low 233 Trusted Unencoded + { + RegionData Variable + { RegionHandle U64 } + } +} + +// dataserver -> sim +// tell a particular simulator to finish parcel sale. +{ + ParcelAuctions Low 234 Trusted Unencoded + { + ParcelData Variable + { ParcelID LLUUID } + { WinnerID LLUUID } + } +} + +// *************************************************************************** +// UUID to name lookup +// *************************************************************************** + +// UUIDNameRequest +// Translate a UUID into first and last names +{ + UUIDNameRequest Low 235 NotTrusted Unencoded + { + UUIDNameBlock Variable + { ID LLUUID } + } +} + +// UUIDNameReply +// Translate a UUID into first and last names +{ + UUIDNameReply Low 236 Trusted Unencoded + { + UUIDNameBlock Variable + { ID LLUUID } + { FirstName Variable 1 } + { LastName Variable 1 } + } +} + +// UUIDGroupNameRequest +// Translate a UUID into a group name +{ + UUIDGroupNameRequest Low 237 NotTrusted Unencoded + { + UUIDNameBlock Variable + { ID LLUUID } + } +} + +// UUIDGroupNameReply +// Translate a UUID into a group name +{ + UUIDGroupNameReply Low 238 Trusted Unencoded + { + UUIDNameBlock Variable + { ID LLUUID } + { GroupName Variable 1 } + } +} + +// end uuid to name lookup + +// *************************************************************************** +// Simulator to Simulator Messages +// *************************************************************************** + +// ChatPass +// Chat message transmission to neighbors +// Chat is region local to receiving simulator. +// Type is one of CHAT_TYPE_NORMAL, _WHISPER, _SHOUT +{ + ChatPass Low 239 Trusted Zerocoded + { + ChatData Single + { Channel S32 } + { Position LLVector3 } + { ID LLUUID } + { OwnerID LLUUID } + { Name Variable 1 } + { SourceType U8 } + { Type U8 } + { Radius F32 } + { SimAccess U8 } + { Message Variable 2 } + } +} + +// Edge data - compressed edge data + +{ + EdgeDataPacket High 24 Trusted Zerocoded + { + EdgeData Single + { LayerType U8 } + { Direction U8 } + { LayerData Variable 2 } + } +} + +// Sim status, condition of this sim +// sent reliably, when dirty +{ + SimStatus Medium 12 Trusted Unencoded + { + SimStatus Single + { CanAcceptAgents BOOL } + { CanAcceptTasks BOOL } + } + { + SimFlags Single + { Flags U64 } + } +} + +// Child Agent Update - agents send child agents to neighboring simulators. +// This will create a child camera if there isn't one at the target already +// Can't send viewer IP and port between simulators -- the port may get remapped +// if the viewer is behind a Network Address Translation (NAT) box. +// +// Note: some of the fields of this message really only need to be sent when an +// agent crosses a region boundary and changes from a child to a main agent +// (such as Head/BodyRotation, ControlFlags, Animations etc) +// simulator -> simulator +// reliable +{ + ChildAgentUpdate High 25 Trusted Zerocoded + { + AgentData Single + + { RegionHandle U64 } + { ViewerCircuitCode U32 } + { AgentID LLUUID } + { SessionID LLUUID } + + { AgentPos LLVector3 } + { AgentVel LLVector3 } + { Center LLVector3 } + { Size LLVector3 } + { AtAxis LLVector3 } + { LeftAxis LLVector3 } + { UpAxis LLVector3 } + { ChangedGrid BOOL } // BOOL + + { Far F32 } + { Aspect F32 } + { Throttles Variable 1 } + { LocomotionState U32 } + { HeadRotation LLQuaternion } + { BodyRotation LLQuaternion } + { ControlFlags U32 } + { EnergyLevel F32 } + { GodLevel U8 } // Changed from BOOL to U8, and renamed GodLevel (from Godlike) + { AlwaysRun BOOL } + { PreyAgent LLUUID } + { AgentAccess U8 } + { AgentTextures Variable 2 } + { ActiveGroupID LLUUID } + } + { + GroupData Variable + { GroupID LLUUID } + { GroupPowers U64 } + { AcceptNotices BOOL } + } + { + AnimationData Variable + { Animation LLUUID } + { ObjectID LLUUID } + } + { + GranterBlock Variable + { GranterID LLUUID } + } + { + NVPairData Variable + { NVPairs Variable 2 } + } + { + VisualParam Variable + { ParamValue U8 } + } + { + AgentAccess Variable + { AgentLegacyAccess U8 } + { AgentMaxAccess U8 } + } + { + AgentInfo Variable + { Flags U32 } + } + { + AgentInventoryHost Variable + { InventoryHost Variable 1 } //String + } +} + +// ChildAgentAlive +// sent to child agents just to keep them alive +{ + ChildAgentAlive High 26 Trusted Unencoded + { + AgentData Single + { RegionHandle U64 } + { ViewerCircuitCode U32 } + { AgentID LLUUID } + { SessionID LLUUID } + } +} + +// ChildAgentPositionUpdate +// sent to child agents just to keep them alive +{ + ChildAgentPositionUpdate High 27 Trusted Unencoded + { + AgentData Single + + { RegionHandle U64 } + { ViewerCircuitCode U32 } + { AgentID LLUUID } + { SessionID LLUUID } + + { AgentPos LLVector3 } + { AgentVel LLVector3 } + { Center LLVector3 } + { Size LLVector3 } + { AtAxis LLVector3 } + { LeftAxis LLVector3 } + { UpAxis LLVector3 } + { ChangedGrid BOOL } + } +} + + +// Obituary for child agents - make sure the parent know the child is dead +// This way, children can be reliably restarted +{ + ChildAgentDying Low 240 Trusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } +} + + +// This is sent if a full child agent hasn't been accepted yet +{ + ChildAgentUnknown Low 241 Trusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } +} + + +// This message is sent how objects get passed between regions. +{ + AtomicPassObject High 28 Trusted Unencoded + { + TaskData Single + { TaskID LLUUID } + { AttachmentNeedsSave BOOL } // true iff is attachment and needs asset saved + } +} + + +// KillChildAgents - A new agent has connected to the simulator . . . make sure that any old child cameras are blitzed +{ + KillChildAgents Low 242 Trusted Unencoded + { + IDBlock Single + { AgentID LLUUID } + } +} + + +// GetScriptRunning - asks if a script is running or not. the simulator +// responds with ScriptRunningReply +{ + GetScriptRunning Low 243 NotTrusted Unencoded + { + Script Single + { ObjectID LLUUID } + { ItemID LLUUID } + } +} + +// ScriptRunningReply - response from simulator to message above +{ + ScriptRunningReply Low 244 NotTrusted Unencoded UDPDeprecated + { + Script Single + { ObjectID LLUUID } + { ItemID LLUUID } + { Running BOOL } +// { Mono BOOL } Added to LLSD message + } +} + + +// SetScriptRunning - makes a script active or inactive (Enable may be +// true or false) +{ + SetScriptRunning Low 245 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + Script Single + { ObjectID LLUUID } + { ItemID LLUUID } + { Running BOOL } + } +} + +// ScriptReset - causes a script to reset +{ + ScriptReset Low 246 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + Script Single + { ObjectID LLUUID } + { ItemID LLUUID } + } +} + +// ScriptSensorRequest - causes the receiving sim to run a script sensor and return the results +{ + ScriptSensorRequest Low 247 Trusted Zerocoded + { + Requester Single + { SourceID LLUUID } + { RequestID LLUUID } + { SearchID LLUUID } + { SearchPos LLVector3 } + { SearchDir LLQuaternion } + { SearchName Variable 1 } + { Type S32 } + { Range F32 } + { Arc F32 } + { RegionHandle U64 } + { SearchRegions U8 } + } +} + +// ScriptSensorReply - returns the request script search information back to the requester +{ + ScriptSensorReply Low 248 Trusted Zerocoded + { + Requester Single + { SourceID LLUUID } + } + { + SensedData Variable + { ObjectID LLUUID } + { OwnerID LLUUID } + { GroupID LLUUID } + { Position LLVector3 } + { Velocity LLVector3 } + { Rotation LLQuaternion } + { Name Variable 1 } + { Type S32 } + { Range F32 } + } +} + +//----------------------------------------------------------------------------- +// Login and Agent Motion +//----------------------------------------------------------------------------- + +// viewer -> sim +// agent is coming into the region. The region should be expecting the +// agent. +{ + CompleteAgentMovement Low 249 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + { CircuitCode U32 } + } +} + +// sim -> viewer +{ + AgentMovementComplete Low 250 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + Data Single + { Position LLVector3 } + { LookAt LLVector3 } + { RegionHandle U64 } + { Timestamp U32 } + } + { + SimData Single + { ChannelVersion Variable 2 } + } +} + + +//----------------------------------------------------------------------------- +// Logout +//----------------------------------------------------------------------------- + +// userserver -> dataserver +{ + DataServerLogout Low 251 Trusted Unencoded + { + UserData Single + { AgentID LLUUID } + { ViewerIP IPADDR } + { Disconnect BOOL } + { SessionID LLUUID } + } +} + +// LogoutRequest +// viewer -> sim +// reliable +{ + LogoutRequest Low 252 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } +} + + +// LogoutReply +// it's ok for the viewer to quit. +// sim -> viewer +// reliable +// Includes inventory items to update with new asset ids +{ + LogoutReply Low 253 Trusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + InventoryData Variable + { ItemID LLUUID } // null if list is actually empty (but has one entry 'cause it can't have none) + } +} + + +//----------------------------------------------------------------------------- +// Instant Message +//----------------------------------------------------------------------------- + +// ImprovedInstantMessage +// This message can potentially route all over the place +// ParentEstateID: parent estate id of the source estate +// RegionID: region id of the source of the IM. +// Position: position of the sender in region local coordinates +// Dialog see llinstantmessage.h for values +// ID May be used by dialog. Interpretation depends on context. +// BinaryBucket May be used by some dialog types +// reliable +{ + ImprovedInstantMessage Low 254 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + MessageBlock Single + { FromGroup BOOL } + { ToAgentID LLUUID } + { ParentEstateID U32 } + { RegionID LLUUID } + { Position LLVector3 } + { Offline U8 } + { Dialog U8 } // U8 - IM type + { ID LLUUID } + { Timestamp U32 } + { FromAgentName Variable 1 } + { Message Variable 2 } + { BinaryBucket Variable 2 } + } + { + EstateBlock Single + { EstateID U32 } + } +} + +// RetrieveInstantMessages - used to get instant messages that +// were persisted out to the database while the user was offline +// Sent from viewer->simulator. Also see RetrieveIMsExtended (back-end only) +{ + RetrieveInstantMessages Low 255 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } +} + +// FindAgent - used to find an agent's global position. I used a +// variable sized LocationBlock so that the message can be recycled with +// minimum new messages and handlers. +{ + FindAgent Low 256 NotTrusted Unencoded + { + AgentBlock Single + { Hunter LLUUID } + { Prey LLUUID } + { SpaceIP IPADDR } + } + { + LocationBlock Variable + { GlobalX F64 } + { GlobalY F64 } + } +} + +// Set godlike to 1 if you want to become godlike. +// Set godlike to 0 if you want to relinquish god powers. +// viewer -> simulator -> dataserver +// reliable +{ + RequestGodlikePowers Low 257 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + RequestBlock Single + { Godlike BOOL } + { Token LLUUID } // viewer packs a null, sim packs token + } +} + +// At the simulator, turn the godlike bit on. +// At the viewer, show the god menu. +// dataserver -> simulator -> viewer +// reliable +{ + GrantGodlikePowers Low 258 Trusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + GrantData Single + { GodLevel U8 } + { Token LLUUID } // checked on sim, ignored on viewer + } +} + +// GodlikeMessage - generalized construct for Gods to send messages +// around the system. Each Request has it's own internal protocol. +{ + GodlikeMessage Low 259 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + { TransactionID LLUUID } + } + { + MethodData Single + { Method Variable 1 } + { Invoice LLUUID } + } + { + ParamList Variable + { Parameter Variable 1 } + } +} + +// EstateOwnerMessage +// format must be identical to above +{ + EstateOwnerMessage Low 260 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + { TransactionID LLUUID } + } + { + MethodData Single + { Method Variable 1 } + { Invoice LLUUID } + } + { + ParamList Variable + { Parameter Variable 1 } + } +} + +// GenericMessage +// format must be identical to above +// As above, but don't have to be god or estate owner to send. +{ + GenericMessage Low 261 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + { TransactionID LLUUID } + } + { + MethodData Single + { Method Variable 1 } + { Invoice LLUUID } + } + { + ParamList Variable + { Parameter Variable 1 } + } +} + +// *************************************************************************** +// Requests for possessions, acquisition, money, etc +// *************************************************************************** + +// request for mute list +{ + MuteListRequest Low 262 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + MuteData Single + { MuteCRC U32 } + } +} + +// update/add someone in the mute list +{ + UpdateMuteListEntry Low 263 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + MuteData Single + { MuteID LLUUID } + { MuteName Variable 1 } + { MuteType S32 } + { MuteFlags U32 } + } +} + +// Remove a mute list entry. +{ + RemoveMuteListEntry Low 264 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + MuteData Single + { MuteID LLUUID } + { MuteName Variable 1 } + } +} + + +// +// Inventory update messages +// UDP DEPRECATED - Now a viewer capability. + +{ + CopyInventoryFromNotecard Low 265 NotTrusted Zerocoded UDPDeprecated + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + NotecardData Single + { NotecardItemID LLUUID } + { ObjectID LLUUID } + } + { + InventoryData Variable + { ItemID LLUUID } + { FolderID LLUUID } + } +} + +// +// This is used bi-directionally between sim, dataserver, and viewer. +// THIS MESSAGE CAN NOT CREATE NEW INVENTORY ITEMS. +// +{ + UpdateInventoryItem Low 266 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + { TransactionID LLUUID } + } + { + InventoryData Variable + { ItemID LLUUID } + { FolderID LLUUID } + { CallbackID U32 } // Async Response + + { CreatorID LLUUID } // permissions + { OwnerID LLUUID } // permissions + { GroupID LLUUID } // permissions + { BaseMask U32 } // permissions + { OwnerMask U32 } // permissions + { GroupMask U32 } // permissions + { EveryoneMask U32 } // permissions + { NextOwnerMask U32 } // permissions + { GroupOwned BOOL } // permissions + + { TransactionID LLUUID } // TransactionID: new assets only + { Type S8 } + { InvType S8 } + { Flags U32 } + { SaleType U8 } + { SalePrice S32 } + { Name Variable 1 } + { Description Variable 1 } + { CreationDate S32 } + { CRC U32 } + } +} + +// +// For sim to request update/create. +// DO NOT ALLOW THIS FROM THE VIEWER. +// +{ + UpdateCreateInventoryItem Low 267 Trusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SimApproved BOOL } + { TransactionID LLUUID } + } + { + InventoryData Variable + { ItemID LLUUID } + { FolderID LLUUID } + { CallbackID U32 } // Async Response + + { CreatorID LLUUID } // permissions + { OwnerID LLUUID } // permissions + { GroupID LLUUID } // permissions + { BaseMask U32 } // permissions + { OwnerMask U32 } // permissions + { GroupMask U32 } // permissions + { EveryoneMask U32 } // permissions + { NextOwnerMask U32 } // permissions + { GroupOwned BOOL } // permissions + + { AssetID LLUUID } + { Type S8 } + { InvType S8 } + { Flags U32 } + { SaleType U8 } + { SalePrice S32 } + { Name Variable 1 } + { Description Variable 1 } + { CreationDate S32 } + { CRC U32 } + } +} + +{ + MoveInventoryItem Low 268 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + { Stamp BOOL } // should the server re-timestamp? + } + { + InventoryData Variable + { ItemID LLUUID } + { FolderID LLUUID } + { NewName Variable 1 } + } +} + +// copy inventory item by item id to specified destination folder, +// send out bulk inventory update when done. +// +// Inventory items are only unique for {agent, inv_id} pairs; +// the OldItemID needs to be paired with the OldAgentID to +// produce a unique inventory item. +{ + CopyInventoryItem Low 269 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + InventoryData Variable + { CallbackID U32 } // Async response + { OldAgentID LLUUID } + { OldItemID LLUUID } + { NewFolderID LLUUID } + { NewName Variable 1 } + } +} + +{ + RemoveInventoryItem Low 270 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + InventoryData Variable + { ItemID LLUUID } + } +} + +{ + ChangeInventoryItemFlags Low 271 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + InventoryData Variable + { ItemID LLUUID } + { Flags U32 } + } +} + +// +// Sim outgoing only (to dataserver, to viewer) +// NOT viewer to sim, sim should not have handler, ever +// This message is currently only uses objects, so the viewer ignores +// the asset id. +{ + SaveAssetIntoInventory Low 272 Trusted Unencoded + { + AgentData Single + { AgentID LLUUID } + } + { + InventoryData Single + { ItemID LLUUID } + { NewAssetID LLUUID } + } +} + +{ + CreateInventoryFolder Low 273 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + FolderData Single + { FolderID LLUUID } + { ParentID LLUUID } + { Type S8 } + { Name Variable 1 } + } +} + +{ + UpdateInventoryFolder Low 274 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + FolderData Variable + { FolderID LLUUID } + { ParentID LLUUID } + { Type S8 } + { Name Variable 1 } + } +} + +{ + MoveInventoryFolder Low 275 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + { Stamp BOOL } // should the server re-timestamp children + } + { + InventoryData Variable + { FolderID LLUUID } + { ParentID LLUUID } + } +} + +{ + RemoveInventoryFolder Low 276 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + FolderData Variable + { FolderID LLUUID } + } +} + +// Get inventory segment. +{ + FetchInventoryDescendents Low 277 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + InventoryData Single + { FolderID LLUUID } + { OwnerID LLUUID } + { SortOrder S32 } // 0 = name, 1 = time + { FetchFolders BOOL } // false will omit folders in query + { FetchItems BOOL } // false will omit items in query + } +} + +// return inventory segment. +// *NOTE: This could be compressed more since we already know the +// parent_id for folders and the folder_id for items, but this is +// reasonable until we heve server side inventory. +{ + InventoryDescendents Low 278 Trusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { FolderID LLUUID } + { OwnerID LLUUID } // owner of the folders creatd. + { Version S32 } // version of the folder for caching + { Descendents S32 } // count to help with caching + } + { + FolderData Variable + { FolderID LLUUID } + { ParentID LLUUID } + { Type S8 } + { Name Variable 1 } + } + { + ItemData Variable + { ItemID LLUUID } + { FolderID LLUUID } + { CreatorID LLUUID } // permissions + { OwnerID LLUUID } // permissions + { GroupID LLUUID } // permissions + { BaseMask U32 } // permissions + { OwnerMask U32 } // permissions + { GroupMask U32 } // permissions + { EveryoneMask U32 } // permissions + { NextOwnerMask U32 } // permissions + { GroupOwned BOOL } // permissions + { AssetID LLUUID } + { Type S8 } + { InvType S8 } + { Flags U32 } + { SaleType U8 } + { SalePrice S32 } + { Name Variable 1 } + { Description Variable 1 } + { CreationDate S32 } + { CRC U32 } + } +} + +// Get inventory item(s) - response comes through FetchInventoryReply +{ + FetchInventory Low 279 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + InventoryData Variable + { OwnerID LLUUID } + { ItemID LLUUID } + } +} + +// response to fetch inventory +{ + FetchInventoryReply Low 280 Trusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + } + { + InventoryData Variable + { ItemID LLUUID } + { FolderID LLUUID } + + { CreatorID LLUUID } // permissions + { OwnerID LLUUID } // permissions + { GroupID LLUUID } // permissions + { BaseMask U32 } // permissions + { OwnerMask U32 } // permissions + { GroupMask U32 } // permissions + { EveryoneMask U32 } // permissions + { NextOwnerMask U32 } // permissions + { GroupOwned BOOL } // permissions + + { AssetID LLUUID } + { Type S8 } + { InvType S8 } + { Flags U32 } + { SaleType U8 } + { SalePrice S32 } + { Name Variable 1 } + { Description Variable 1 } + { CreationDate S32 } + { CRC U32 } + } +} + +// Can only fit around 7 items per packet - that's the way it goes. At +// least many bulk updates can be packed. +// Only from dataserver->sim->viewer +{ + BulkUpdateInventory Low 281 Trusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { TransactionID LLUUID } + } + { + FolderData Variable + { FolderID LLUUID } + { ParentID LLUUID } + { Type S8 } + { Name Variable 1 } + } + { + ItemData Variable + { ItemID LLUUID } + { CallbackID U32 } // Async Response + { FolderID LLUUID } + { CreatorID LLUUID } // permissions + { OwnerID LLUUID } // permissions + { GroupID LLUUID } // permissions + { BaseMask U32 } // permissions + { OwnerMask U32 } // permissions + { GroupMask U32 } // permissions + { EveryoneMask U32 } // permissions + { NextOwnerMask U32 } // permissions + { GroupOwned BOOL } // permissions + { AssetID LLUUID } + { Type S8 } + { InvType S8 } + { Flags U32 } + { SaleType U8 } + { SalePrice S32 } + { Name Variable 1 } + { Description Variable 1 } + { CreationDate S32 } + { CRC U32 } + } +} + + + +// request permissions for agent id to get the asset for owner_id's +// item_id. +{ + RequestInventoryAsset Low 282 Trusted Unencoded + { + QueryData Single + { QueryID LLUUID } + { AgentID LLUUID } + { OwnerID LLUUID } + { ItemID LLUUID } + } +} + +// response to RequestInventoryAsset +// lluuid will be null if agentid in the request above cannot read asset +{ + InventoryAssetResponse Low 283 Trusted Unencoded + { + QueryData Single + { QueryID LLUUID } + { AssetID LLUUID } + { IsReadable BOOL } + } +} + +// This is the new improved way to remove inventory items. It is +// currently only supported in viewer->userserver->dataserver +// messages typically initiated by an empty trash method. +{ + RemoveInventoryObjects Low 284 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + FolderData Variable + { FolderID LLUUID } + } + { + ItemData Variable + { ItemID LLUUID } + } +} + +// This is how you remove inventory when you're not even sure what it +// is - only it's parenting. +{ + PurgeInventoryDescendents Low 285 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + InventoryData Single + { FolderID LLUUID } + } +} + +// These messages are viewer->simulator requests to update a task's +// inventory. +// if Key == 0, itemid is the key. if Key == 1, assetid is the key. +{ + UpdateTaskInventory Low 286 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + UpdateData Single + { LocalID U32 } + { Key U8 } + } + { + InventoryData Single + { ItemID LLUUID } + { FolderID LLUUID } + { CreatorID LLUUID } // permissions + { OwnerID LLUUID } // permissions + { GroupID LLUUID } // permissions + { BaseMask U32 } // permissions + { OwnerMask U32 } // permissions + { GroupMask U32 } // permissions + { EveryoneMask U32 } // permissions + { NextOwnerMask U32 } // permissions + { GroupOwned BOOL } // permissions + { TransactionID LLUUID } + { Type S8 } + { InvType S8 } + { Flags U32 } + { SaleType U8 } + { SalePrice S32 } + { Name Variable 1 } + { Description Variable 1 } + { CreationDate S32 } + { CRC U32 } + } +} + +{ + RemoveTaskInventory Low 287 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + InventoryData Single + { LocalID U32 } + { ItemID LLUUID } + } +} + +{ + MoveTaskInventory Low 288 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + { FolderID LLUUID } + } + { + InventoryData Single + { LocalID U32 } + { ItemID LLUUID } + } +} + +{ + RequestTaskInventory Low 289 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + InventoryData Single + { LocalID U32 } + } +} + +{ + ReplyTaskInventory Low 290 Trusted Zerocoded + { + InventoryData Single + { TaskID LLUUID } + { Serial S16 } // S16 + { Filename Variable 1 } + } +} + +// These messages are viewer->simulator requests regarding objects +// which are currently being simulated. The viewer will get an +// UpdateInventoryItem response if a DeRez succeeds, and the object +// will appear if a RezObject succeeds. +// The Destination field tells where the derez should wind up, and the +// meaning of DestinationID depends on it. For example, if the +// destination is a category, then the destination is the category id. If +// the destination is a task inventory, then the destination id is the +// task id. +// The transaction id is generated by the viewer on derez, and then +// the packets are counted and numbered. The rest of the information is +// just duplicated (it's not that much, and derezzes that span multiple +// packets will be rare.) +{ + DeRezObject Low 291 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + AgentBlock Single + { GroupID LLUUID } + { Destination U8 } + { DestinationID LLUUID } // see above + { TransactionID LLUUID } + { PacketCount U8 } + { PacketNumber U8 } + } + { + ObjectData Variable + { ObjectLocalID U32 } // object id in world + } +} + +// This message is sent when a derez succeeds, but there's no way to +// know, since no inventory is created on the viewer. For example, when +// saving into task inventory. +{ + DeRezAck Low 292 Trusted Unencoded + { + TransactionData Single + { TransactionID LLUUID } + { Success BOOL } + } +} + +// This message is sent from viewer -> simulator when the viewer wants +// to rez an object out of inventory. +{ + RezObject Low 293 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + { GroupID LLUUID } + } + { + RezData Single + { FromTaskID LLUUID } + { BypassRaycast U8 } + { RayStart LLVector3 } + { RayEnd LLVector3 } + { RayTargetID LLUUID } + { RayEndIsIntersection BOOL } + { RezSelected BOOL } + { RemoveItem BOOL } + { ItemFlags U32 } + { GroupMask U32 } + { EveryoneMask U32 } + { NextOwnerMask U32 } + } + { + InventoryData Single + { ItemID LLUUID } + { FolderID LLUUID } + { CreatorID LLUUID } // permissions + { OwnerID LLUUID } // permissions + { GroupID LLUUID } // permissions + { BaseMask U32 } // permissions + { OwnerMask U32 } // permissions + { GroupMask U32 } // permissions + { EveryoneMask U32 } // permissions + { NextOwnerMask U32 } // permissions + { GroupOwned BOOL } // permissions + { TransactionID LLUUID } + { Type S8 } + { InvType S8 } + { Flags U32 } + { SaleType U8 } + { SalePrice S32 } + { Name Variable 1 } + { Description Variable 1 } + { CreationDate S32 } + { CRC U32 } + } +} + +// This message is sent from viewer -> simulator when the viewer wants +// to rez an object from a notecard. +{ + RezObjectFromNotecard Low 294 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + { GroupID LLUUID } + } + { + RezData Single + { FromTaskID LLUUID } + { BypassRaycast U8 } + { RayStart LLVector3 } + { RayEnd LLVector3 } + { RayTargetID LLUUID } + { RayEndIsIntersection BOOL } + { RezSelected BOOL } + { RemoveItem BOOL } + { ItemFlags U32 } + { GroupMask U32 } + { EveryoneMask U32 } + { NextOwnerMask U32 } + } + { + NotecardData Single + { NotecardItemID LLUUID } + { ObjectID LLUUID } + } + { + InventoryData Variable + { ItemID LLUUID } + } +} + + +// sim -> dataserver +// sent during agent to agent inventory transfers +{ + TransferInventory Low 295 Trusted Zerocoded + { + InfoBlock Single + { SourceID LLUUID } + { DestID LLUUID } + { TransactionID LLUUID } + } + { + InventoryBlock Variable + { InventoryID LLUUID } + { Type S8 } + } + { + ValidationBlock Single + { NeedsValidation BOOL } + { EstateID U32 } + } +} + +// dataserver -> sim +// InventoryID is the id of the inventory object that the end user +// should discard if they deny the transfer. +{ + TransferInventoryAck Low 296 Trusted Zerocoded + { + InfoBlock Single + { TransactionID LLUUID } + { InventoryID LLUUID } + } +} + + +{ + AcceptFriendship Low 297 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + TransactionBlock Single + { TransactionID LLUUID } + } + { + FolderData Variable + { FolderID LLUUID } // place to put calling card. + } +} + +{ + DeclineFriendship Low 298 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + TransactionBlock Single + { TransactionID LLUUID } + } +} + +{ + FormFriendship Low 299 Trusted Unencoded + { + AgentBlock Single + { SourceID LLUUID } + { DestID LLUUID } + } +} + +// Cancels user relationship +// Updates inventory for both users. +// Stops agent tracking in userserver. +// viewer -> userserver -> dataserver +// reliable +{ + TerminateFriendship Low 300 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + ExBlock Single + { OtherID LLUUID } + } +} + +// used to give someone a calling card. +{ + OfferCallingCard Low 301 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + AgentBlock Single + { DestID LLUUID } + { TransactionID LLUUID } + } +} + +{ + AcceptCallingCard Low 302 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + TransactionBlock Single + { TransactionID LLUUID } + } + { + FolderData Variable + { FolderID LLUUID } // place to put calling card. + } +} + +{ + DeclineCallingCard Low 303 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + TransactionBlock Single + { TransactionID LLUUID } + } +} + + +// Rez a script onto an object +{ + RezScript Low 304 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + { GroupID LLUUID } + } + { + UpdateBlock Single + { ObjectLocalID U32 } // object id in world + { Enabled BOOL } // is script rezzed in enabled? + } + { + InventoryBlock Single + { ItemID LLUUID } + { FolderID LLUUID } + { CreatorID LLUUID } // permissions + { OwnerID LLUUID } // permissions + { GroupID LLUUID } // permissions + { BaseMask U32 } // permissions + { OwnerMask U32 } // permissions + { GroupMask U32 } // permissions + { EveryoneMask U32 } // permissions + { NextOwnerMask U32 } // permissions + { GroupOwned BOOL } // permissions + { TransactionID LLUUID } + { Type S8 } + { InvType S8 } + { Flags U32 } + { SaleType U8 } + { SalePrice S32 } + { Name Variable 1 } + { Description Variable 1 } + { CreationDate S32 } + { CRC U32 } + } +} + +// Create inventory +{ + CreateInventoryItem Low 305 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + InventoryBlock Single + { CallbackID U32 } // Async Response + { FolderID LLUUID } + { TransactionID LLUUID } // Going to become TransactionID + { NextOwnerMask U32 } + { Type S8 } + { InvType S8 } + { WearableType U8 } + { Name Variable 1 } + { Description Variable 1 } + } +} + +// give agent a landmark for an event. +{ + CreateLandmarkForEvent Low 306 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + EventData Single + { EventID U32 } + } + { + InventoryBlock Single + { FolderID LLUUID } + { Name Variable 1 } + } +} + +{ + EventLocationRequest Low 307 Trusted Zerocoded + { + QueryData Single + { QueryID LLUUID } + } + { + EventData Single + { EventID U32 } + } +} + +{ + EventLocationReply Low 308 Trusted Zerocoded + { + QueryData Single + { QueryID LLUUID } + } + { + EventData Single + { Success BOOL } + { RegionID LLUUID } + { RegionPos LLVector3 } + } +} + +// get information about landmarks. Used by viewers for determining +// the location of a landmark, and by simulators for teleport +{ + RegionHandleRequest Low 309 NotTrusted Unencoded + { + RequestBlock Single + { RegionID LLUUID } + } +} + +{ + RegionIDAndHandleReply Low 310 Trusted Unencoded + { + ReplyBlock Single + { RegionID LLUUID } + { RegionHandle U64 } + } +} + +// Move money from one agent to another. Validation will happen at the +// simulator, the dataserver will actually do the work. Dataserver +// generates a MoneyBalance message in reply. The simulator +// will generate a MoneyTransferBackend in response to this. +// viewer -> simulator -> dataserver +{ + MoneyTransferRequest Low 311 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + MoneyData Single + { SourceID LLUUID } + { DestID LLUUID } // destination of the transfer + { Flags U8 } + { Amount S32 } + { AggregatePermNextOwner U8 } + { AggregatePermInventory U8 } + { TransactionType S32 } // see lltransactiontypes.h + { Description Variable 1 } // string, name of item for purchases + } +} + +// And, the money transfer +// *NOTE: Unused as of 2010-04-06, because all back-end money transactions +// are done with web services via L$ API. JC +{ + MoneyTransferBackend Low 312 Trusted Zerocoded + { + MoneyData Single + { TransactionID LLUUID } + { TransactionTime U32 } // utc seconds since epoch + { SourceID LLUUID } + { DestID LLUUID } // destination of the transfer + { Flags U8 } + { Amount S32 } + { AggregatePermNextOwner U8 } + { AggregatePermInventory U8 } + { TransactionType S32 } // see lltransactiontypes.h + { RegionID LLUUID } // region sending the request, for logging + { GridX U32 } // *HACK: database doesn't have region_id in schema + { GridY U32 } // *HACK: database doesn't have region_id in schema + { Description Variable 1 } // string, name of item for purchases + } +} + + +// viewer -> userserver -> dataserver +// Reliable +{ + MoneyBalanceRequest Low 313 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + MoneyData Single + { TransactionID LLUUID } + } +} + + +// dataserver -> simulator -> viewer +{ + MoneyBalanceReply Low 314 Trusted Zerocoded + { + MoneyData Single + { AgentID LLUUID } + { TransactionID LLUUID } + { TransactionSuccess BOOL } // BOOL + { MoneyBalance S32 } + { SquareMetersCredit S32 } + { SquareMetersCommitted S32 } + { Description Variable 1 } // string + } + // For replies that are part of a transaction (buying something) provide + // metadata for localization. If TransactionType is 0, the message is + // purely a balance update. Added for server 1.40 and viewer 2.1. JC + { + TransactionInfo Single + { TransactionType S32 } // lltransactiontype.h + { SourceID LLUUID } + { IsSourceGroup BOOL } + { DestID LLUUID } + { IsDestGroup BOOL } + { Amount S32 } + { ItemDescription Variable 1 } // string + } +} + + +// RoutedMoneyBalanceReply +// This message is used when a dataserver needs to send updated +// money balance information to a simulator other than the one it +// is connected to. It uses the standard TransferBlock format. +// dataserver -> simulator -> spaceserver -> simulator -> viewer +// reliable +{ + RoutedMoneyBalanceReply Low 315 Trusted Zerocoded UDPDeprecated + { + TargetBlock Single + { TargetIP IPADDR } // U32 encoded IP + { TargetPort IPPORT } + } + { + MoneyData Single + { AgentID LLUUID } + { TransactionID LLUUID } + { TransactionSuccess BOOL } // BOOL + { MoneyBalance S32 } + { SquareMetersCredit S32 } + { SquareMetersCommitted S32 } + { Description Variable 1 } // string + } + // See MoneyBalanceReply above. + { + TransactionInfo Single + { TransactionType S32 } // lltransactiontype.h + { SourceID LLUUID } + { IsSourceGroup BOOL } + { DestID LLUUID } + { IsDestGroup BOOL } + { Amount S32 } + { ItemDescription Variable 1 } // string + } +} + + + +//--------------------------------------------------------------------------- +// Gesture saves/loads +//--------------------------------------------------------------------------- + + +// Tell the database that some gestures are now active +// viewer -> sim -> data +{ + ActivateGestures Low 316 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + { Flags U32 } + } + { + Data Variable + { ItemID LLUUID } + { AssetID LLUUID } + { GestureFlags U32 } + } +} + +// Tell the database some gestures are no longer active +// viewer -> sim -> data +{ + DeactivateGestures Low 317 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + { Flags U32 } + } + { + Data Variable + { ItemID LLUUID } + { GestureFlags U32 } + } +} + +//--------------------------------------------------------------------------- +// +//--------------------------------------------------------------------------- + +// userserver -> viewer, up-to-date inventory is here +// could be sent as a result of spam +// as well as in response to InventoryRequest +//{ +// InventoryUpdate Low Trusted Unencoded +// { +// AgentData Single +// { AgentID LLUUID } +// } +// { +// InventoryData Single +// { IsComplete U8 } +// { Filename Variable 1 } +// } +//} + +// dataserver-> userserver -> viewer to move around the mute list +{ + MuteListUpdate Low 318 Trusted Unencoded + { + MuteData Single + { AgentID LLUUID } + { Filename Variable 1 } + } +} + +// tell viewer to use the local mute cache +{ + UseCachedMuteList Low 319 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + } +} + +// Sent from viewer to simulator to set user rights. This message will be +// relayed up to the dataserver through a PUT. If that +// succeeds, an UpdateUserRights will be relayed to the originating +// viewer, and a presence lookup will be performed to find +// agent-related and the same PUT will be issued to the sim host if +// they are online. +{ + GrantUserRights Low 320 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + Rights Variable + { AgentRelated LLUUID } + { RelatedRights S32 } + } +} + +// This message is sent from the simulator to the viewer to indicate a +// targets granted rights. This is only sent to the originator of the +// request and the target agent if it is a modify or map +// right. Adding/removing online status rights will show up as an +// online/offline notification. +{ + ChangeUserRights Low 321 Trusted Unencoded + { + AgentData Single + { AgentID LLUUID } + } + { + Rights Variable + { AgentRelated LLUUID } + { RelatedRights S32 } + } +} + +// notification for login and logout. +// source_sim -> dest_viewer +{ + OnlineNotification Low 322 Trusted Unencoded + { + AgentBlock Variable + { AgentID LLUUID } + } +} +{ + OfflineNotification Low 323 Trusted Unencoded + { + AgentBlock Variable + { AgentID LLUUID } + } +} + + +// SetStartLocationRequest +// viewer -> sim +// failure checked at sim and triggers ImprovedInstantMessage +// success triggers SetStartLocation +{ + SetStartLocationRequest Low 324 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + StartLocationData Single + { SimName Variable 1 } // string + { LocationID U32 } + { LocationPos LLVector3 } // region coords + { LocationLookAt LLVector3 } + } +} + +// SetStartLocation +// sim -> dataserver +{ + SetStartLocation Low 325 Trusted Zerocoded + { + StartLocationData Single + { AgentID LLUUID } + { RegionID LLUUID } + { LocationID U32 } + { RegionHandle U64 } + { LocationPos LLVector3 } // region coords + { LocationLookAt LLVector3 } + } +} + + +// *************************************************************************** +// Launcher messages +// *************************************************************************** + + +// NetTest - This goes back and forth to the space server because of +// problems determining the port +{ + NetTest Low 326 NotTrusted Unencoded + { + NetBlock Single + { Port IPPORT } + } +} + +// SetChildCount - Sent to launcher to adjust nominal child count +// Simulator sends this increase the sim/cpu ratio on startup +{ + SetCPURatio Low 327 NotTrusted Unencoded + { + Data Single + { Ratio U8 } + } +} + + + +// SimCrashed - Sent to dataserver when the sim goes down. +// Maybe we should notify the spaceserver as well? +{ + SimCrashed Low 328 NotTrusted Unencoded + { + Data Single + { RegionX U32 } + { RegionY U32 } + } + { + Users Variable + { AgentID LLUUID } + } +} + +// *************************************************************************** +// Name Value Pair messages +// *************************************************************************** + +// NameValuePair - if the specific task exists on simulator, add or replace this name value pair +{ + NameValuePair Low 329 Trusted Unencoded + { + TaskData Single + { ID LLUUID } + } + { + NameValueData Variable + { NVPair Variable 2 } + } +} + +// NameValuePair - if the specific task exists on simulator or dataserver, remove the name value pair (value is ignored) +{ + RemoveNameValuePair Low 330 Trusted Unencoded + { + TaskData Single + { ID LLUUID } + } + { + NameValueData Variable + { NVPair Variable 2 } + } +} + + +// *************************************************************************** +// Add/Remove Attachment messages +// *************************************************************************** + +// +// Simulator informs Dataserver of new attachment or attachment asset update +// DO NOT ALLOW THIS FROM THE VIEWER +// +{ + UpdateAttachment Low 331 Trusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + AttachmentBlock Single + { AttachmentPoint U8 } + } + { + OperationData Single + { AddItem BOOL } + { UseExistingAsset BOOL } + } + { + InventoryData Single // Standard inventory item block + { ItemID LLUUID } + { FolderID LLUUID } + + { CreatorID LLUUID } // permissions + { OwnerID LLUUID } // permissions + { GroupID LLUUID } // permissions + { BaseMask U32 } // permissions + { OwnerMask U32 } // permissions + { GroupMask U32 } // permissions + { EveryoneMask U32 } // permissions + { NextOwnerMask U32 } // permissions + { GroupOwned BOOL } // permissions + + { AssetID LLUUID } + { Type S8 } + { InvType S8 } + { Flags U32 } + { SaleType U8 } + { SalePrice S32 } + { Name Variable 1 } + { Description Variable 1 } + { CreationDate S32 } + { CRC U32 } + } +} + +// Simulator informs Dataserver that attachment has been taken off +{ + RemoveAttachment Low 332 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + AttachmentBlock Single + { AttachmentPoint U8 } + { ItemID LLUUID } + } +} + + +// *************************************************************************** +// GUIDed Sound messages +// *************************************************************************** + +// SoundTrigger - Sent by simulator to viewer to trigger sound outside current region +{ + SoundTrigger High 29 NotTrusted Unencoded + { + SoundData Single + { SoundID LLUUID } + { OwnerID LLUUID } + { ObjectID LLUUID } + { ParentID LLUUID } // null if this object is the parent + { Handle U64 } // region handle + { Position LLVector3 } // region local + { Gain F32 } + } +} + +// AttachedSound - Sent by simulator to viewer to play sound attached with an object +{ + AttachedSound Medium 13 Trusted Unencoded + { + DataBlock Single + { SoundID LLUUID } + { ObjectID LLUUID } + { OwnerID LLUUID } + { Gain F32 } + { Flags U8 } + } +} + +// AttachedSoundGainChange - Sent by simulator to viewer to change an attached sounds' volume + +{ + AttachedSoundGainChange Medium 14 Trusted Unencoded + { + DataBlock Single + { ObjectID LLUUID } + { Gain F32 } + } +} + + +// PreloadSound - Sent by simulator to viewer to preload sound for an object + +{ + PreloadSound Medium 15 Trusted Unencoded + { + DataBlock Variable + { ObjectID LLUUID } + { OwnerID LLUUID } + { SoundID LLUUID } + } +} + + +// ************************************************************************* +// Asset storage messages +// ************************************************************************* + +// current assumes an existing UUID, need to enhance for new assets +{ + AssetUploadRequest Low 333 NotTrusted Unencoded + { + AssetBlock Single + { TransactionID LLUUID } + { Type S8 } + { Tempfile BOOL } + { StoreLocal BOOL } + { AssetData Variable 2 } // Optional: the actual asset data if the whole thing will fit it this packet + } +} + +{ + AssetUploadComplete Low 334 NotTrusted Unencoded + { + AssetBlock Single + { UUID LLUUID } + { Type S8 } + { Success BOOL } + } +} + + +// Script on simulator asks dataserver if there are any email messages +// waiting. +{ + EmailMessageRequest Low 335 Trusted Unencoded + { + DataBlock Single + { ObjectID LLUUID } + { FromAddress Variable 1 } + { Subject Variable 1 } + } +} + +// Dataserver gives simulator the oldest email message in the queue, along with +// how many messages are left in the queue. And passes back the filter used to request emails. +{ + EmailMessageReply Low 336 Trusted Unencoded + { + DataBlock Single + { ObjectID LLUUID } + { More U32 } //U32 + { Time U32 } //U32 + { FromAddress Variable 1 } + { Subject Variable 1 } + { Data Variable 2 } + { MailFilter Variable 1 } + } +} + +// Script on simulator sends mail to another script +{ + InternalScriptMail Medium 16 Trusted Unencoded + { + DataBlock Single + { From Variable 1 } + { To LLUUID } + { Subject Variable 1 } + { Body Variable 2 } + } +} + +// Script on simulator asks dataserver for information +{ + ScriptDataRequest Low 337 Trusted Unencoded + { + DataBlock Variable + { Hash U64 } + { RequestType S8 } + { Request Variable 2 } + } +} + +// Data server responds with data +{ + ScriptDataReply Low 338 Trusted Unencoded + { + DataBlock Variable + { Hash U64 } + { Reply Variable 2 } + } +} + + +//----------------------------------------------------------------------------- +// Group messages +//----------------------------------------------------------------------------- + +// CreateGroupRequest +// viewer -> simulator +// reliable +{ + CreateGroupRequest Low 339 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + GroupData Single + { Name Variable 1 } // string + { Charter Variable 2 } // string + { ShowInList BOOL } + { InsigniaID LLUUID } + { MembershipFee S32 } // S32 + { OpenEnrollment BOOL } // BOOL (U8) + { AllowPublish BOOL } // whether profile is externally visible or not + { MaturePublish BOOL } // profile is "mature" + } +} + +// CreateGroupReply +// dataserver -> simulator +// simulator -> viewer +// reliable +{ + CreateGroupReply Low 340 Trusted Unencoded + { + AgentData Single + { AgentID LLUUID } + } + { + ReplyData Single + { GroupID LLUUID } + { Success BOOL } + { Message Variable 1 } // string + } +} + +// UpdateGroupInfo +// viewer -> simulator +// simulator -> dataserver +// reliable +{ + UpdateGroupInfo Low 341 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + GroupData Single + { GroupID LLUUID } + { Charter Variable 2 } // string + { ShowInList BOOL } + { InsigniaID LLUUID } + { MembershipFee S32 } + { OpenEnrollment BOOL } + { AllowPublish BOOL } + { MaturePublish BOOL } + } +} + +// GroupRoleChanges +// viewer -> simulator -> dataserver +// reliable +{ + GroupRoleChanges Low 342 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + { GroupID LLUUID } + } + { + RoleChange Variable + { RoleID LLUUID } + { MemberID LLUUID } + { Change U32 } + } +} + +// JoinGroupRequest +// viewer -> simulator +// reliable +{ + JoinGroupRequest Low 343 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + GroupData Single + { GroupID LLUUID } + } +} + +// JoinGroupReply +// dataserver -> simulator -> viewer +{ + JoinGroupReply Low 344 Trusted Unencoded + { + AgentData Single + { AgentID LLUUID } + } + { + GroupData Single + { GroupID LLUUID } + { Success BOOL } + } +} + + +// EjectGroupMemberRequest +// viewer -> simulator -> dataserver +// reliable +{ + EjectGroupMemberRequest Low 345 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + GroupData Single + { GroupID LLUUID } + } + { + EjectData Variable + { EjecteeID LLUUID } + } +} + +// EjectGroupMemberReply +// dataserver -> simulator -> viewer +// reliable +{ + EjectGroupMemberReply Low 346 Trusted Unencoded + { + AgentData Single + { AgentID LLUUID } + } + { + GroupData Single + { GroupID LLUUID } + } + { + EjectData Single + { Success BOOL } + } +} + +// LeaveGroupRequest +// viewer -> simulator -> dataserver +// reliable +{ + LeaveGroupRequest Low 347 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + GroupData Single + { GroupID LLUUID } + } +} + +// LeaveGroupReply +// dataserver -> simulator -> viewer +{ + LeaveGroupReply Low 348 Trusted Unencoded + { + AgentData Single + { AgentID LLUUID } + } + { + GroupData Single + { GroupID LLUUID } + { Success BOOL } + } +} + +// InviteGroupRequest +// viewer -> simulator -> dataserver +// reliable +{ + InviteGroupRequest Low 349 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } // UUID of inviting agent + { SessionID LLUUID } + } + { + GroupData Single + { GroupID LLUUID } + } + { + InviteData Variable + { InviteeID LLUUID } + { RoleID LLUUID } + } +} + +// InviteGroupResponse +// simulator -> dataserver +// reliable +{ + InviteGroupResponse Low 350 Trusted Unencoded + { + InviteData Single + { AgentID LLUUID } + { InviteeID LLUUID } + { GroupID LLUUID } + { RoleID LLUUID } + { MembershipFee S32 } + } + { + GroupData Single + { GroupLimit S32 } // Extra block for the agent's group limit + } +} + +// GroupProfileRequest +// viewer-> simulator -> dataserver +// reliable +{ + GroupProfileRequest Low 351 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + GroupData Single + { GroupID LLUUID } + } +} + +// GroupProfileReply +// dataserver -> simulator -> viewer +// reliable +{ + GroupProfileReply Low 352 Trusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + } + { + GroupData Single + { GroupID LLUUID } + { Name Variable 1 } // string + { Charter Variable 2 } // string + { ShowInList BOOL } + { MemberTitle Variable 1 } // string + { PowersMask U64 } // U32 mask + { InsigniaID LLUUID } + { FounderID LLUUID } + { MembershipFee S32 } + { OpenEnrollment BOOL } // BOOL (U8) + { Money S32 } + { GroupMembershipCount S32 } + { GroupRolesCount S32 } + { AllowPublish BOOL } + { MaturePublish BOOL } + { OwnerRole LLUUID } + } +} + +// CurrentInterval = 0 => this period (week, day, etc.) +// CurrentInterval = 1 => last period +// viewer -> simulator -> dataserver +// reliable +{ + GroupAccountSummaryRequest Low 353 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + { GroupID LLUUID } + } + { + MoneyData Single + { RequestID LLUUID } + { IntervalDays S32 } + { CurrentInterval S32 } + } +} + + +// dataserver -> simulator -> viewer +// Reliable +{ + GroupAccountSummaryReply Low 354 Trusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { GroupID LLUUID } + } + { + MoneyData Single + { RequestID LLUUID } + { IntervalDays S32 } + { CurrentInterval S32 } + { StartDate Variable 1 } // string + { Balance S32 } + { TotalCredits S32 } + { TotalDebits S32 } + { ObjectTaxCurrent S32 } + { LightTaxCurrent S32 } + { LandTaxCurrent S32 } + { GroupTaxCurrent S32 } + { ParcelDirFeeCurrent S32 } + { ObjectTaxEstimate S32 } + { LightTaxEstimate S32 } + { LandTaxEstimate S32 } + { GroupTaxEstimate S32 } + { ParcelDirFeeEstimate S32 } + { NonExemptMembers S32 } + { LastTaxDate Variable 1 } // string + { TaxDate Variable 1 } // string + } +} + + +// Reliable +{ + GroupAccountDetailsRequest Low 355 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + { GroupID LLUUID } + } + { + MoneyData Single + { RequestID LLUUID } + { IntervalDays S32 } + { CurrentInterval S32 } + } +} + +// Reliable +{ + GroupAccountDetailsReply Low 356 Trusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { GroupID LLUUID } + } + { + MoneyData Single + { RequestID LLUUID } + { IntervalDays S32 } + { CurrentInterval S32 } + { StartDate Variable 1 } // string + } + { + HistoryData Variable + { Description Variable 1 } // string + { Amount S32 } + } +} + + +// Reliable +{ + GroupAccountTransactionsRequest Low 357 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + { GroupID LLUUID } + } + { + MoneyData Single + { RequestID LLUUID } + { IntervalDays S32 } + { CurrentInterval S32 } + } +} + +// Reliable +{ + GroupAccountTransactionsReply Low 358 Trusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { GroupID LLUUID } + } + { + MoneyData Single + { RequestID LLUUID } + { IntervalDays S32 } + { CurrentInterval S32 } + { StartDate Variable 1 } // string + } + { + HistoryData Variable + { Time Variable 1 } // string + { User Variable 1 } // string + { Type S32 } + { Item Variable 1 } // string + { Amount S32 } + } +} + +// GroupActiveProposalsRequest +// viewer -> simulator -> dataserver +//reliable +{ + GroupActiveProposalsRequest Low 359 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + GroupData Single + { GroupID LLUUID } + } + { + TransactionData Single + { TransactionID LLUUID } + } +} + +// GroupActiveProposalItemReply +// dataserver -> simulator -> viewer +// reliable +{ + GroupActiveProposalItemReply Low 360 Trusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { GroupID LLUUID } + } + { + TransactionData Single + { TransactionID LLUUID } + { TotalNumItems U32 } + } + { + ProposalData Variable + { VoteID LLUUID } + { VoteInitiator LLUUID } + { TerseDateID Variable 1 } // string + { StartDateTime Variable 1 } // string + { EndDateTime Variable 1 } // string + { AlreadyVoted BOOL } + { VoteCast Variable 1 } // string + { Majority F32 } + { Quorum S32 } + { ProposalText Variable 1 } // string + } +} + +// GroupVoteHistoryRequest +// viewer -> simulator -> dataserver +//reliable +{ + GroupVoteHistoryRequest Low 361 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + GroupData Single + { GroupID LLUUID } + } + { + TransactionData Single + { TransactionID LLUUID } + } +} + +// GroupVoteHistoryItemReply +// dataserver -> simulator -> viewer +// reliable +{ + GroupVoteHistoryItemReply Low 362 Trusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { GroupID LLUUID } + } + { + TransactionData Single + { TransactionID LLUUID } + { TotalNumItems U32 } + } + { + HistoryItemData Single + { VoteID LLUUID } + { TerseDateID Variable 1 } // string + { StartDateTime Variable 1 } // string + { EndDateTime Variable 1 } // string + { VoteInitiator LLUUID } + { VoteType Variable 1 } // string + { VoteResult Variable 1 } // string + { Majority F32 } + { Quorum S32 } + { ProposalText Variable 2 } // string + } + { + VoteItem Variable + { CandidateID LLUUID } + { VoteCast Variable 1 } // string + { NumVotes S32 } + } +} + +// StartGroupProposal +// viewer -> simulator -> dataserver +// reliable +{ + StartGroupProposal Low 363 NotTrusted Zerocoded UDPDeprecated + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + ProposalData Single + { GroupID LLUUID } + { Quorum S32 } + { Majority F32 } // F32 + { Duration S32 } // S32, seconds + { ProposalText Variable 1 } // string + } +} + +// GroupProposalBallot +// viewer -> simulator -> dataserver +// reliable +{ + GroupProposalBallot Low 364 NotTrusted Unencoded UDPDeprecated + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + ProposalData Single + { ProposalID LLUUID } + { GroupID LLUUID } + { VoteCast Variable 1 } // string + } +} + +// TallyVotes userserver -> dataserver +// reliable +{ + TallyVotes Low 365 Trusted Unencoded +} + + + +// GroupMembersRequest +// get the group members +// simulator -> dataserver +// reliable +{ + GroupMembersRequest Low 366 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + GroupData Single + { GroupID LLUUID } + { RequestID LLUUID } + } +} + +// GroupMembersReply +// list of uuids for the group members +// dataserver -> simulator +// reliable +{ + GroupMembersReply Low 367 Trusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + } + { + GroupData Single + { GroupID LLUUID } + { RequestID LLUUID } + { MemberCount S32 } + } + { + MemberData Variable + { AgentID LLUUID } + { Contribution S32 } + { OnlineStatus Variable 1 } // string + { AgentPowers U64 } + { Title Variable 1 } // string + { IsOwner BOOL } + } +} + +// used to switch an agent's currently active group. +// viewer -> simulator -> dataserver -> AgentDataUpdate... +{ + ActivateGroup Low 368 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + { GroupID LLUUID } + } +} + +// viewer -> simulator -> dataserver +{ + SetGroupContribution Low 369 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + Data Single + { GroupID LLUUID } + { Contribution S32 } + } +} + +// viewer -> simulator -> dataserver +{ + SetGroupAcceptNotices Low 370 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + Data Single + { GroupID LLUUID } + { AcceptNotices BOOL } + } + { + NewData Single + { ListInProfile BOOL } + } +} + +// GroupRoleDataRequest +// viewer -> simulator -> dataserver +{ + GroupRoleDataRequest Low 371 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + GroupData Single + { GroupID LLUUID } + { RequestID LLUUID } + } +} + + +// GroupRoleDataReply +// All role data for this group +// dataserver -> simulator -> agent +{ + GroupRoleDataReply Low 372 Trusted Unencoded + { + AgentData Single + { AgentID LLUUID } + } + { + GroupData Single + { GroupID LLUUID } + { RequestID LLUUID } + { RoleCount S32 } + } + { + RoleData Variable + { RoleID LLUUID } + { Name Variable 1 } + { Title Variable 1 } + { Description Variable 1 } + { Powers U64 } + { Members U32 } + } +} + +// GroupRoleMembersRequest +// viewer -> simulator -> dataserver +{ + GroupRoleMembersRequest Low 373 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + GroupData Single + { GroupID LLUUID } + { RequestID LLUUID } + } +} + +// GroupRoleMembersReply +// All role::member pairs for this group. +// dataserver -> simulator -> agent +{ + GroupRoleMembersReply Low 374 Trusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { GroupID LLUUID } + { RequestID LLUUID } + { TotalPairs U32 } + } + { + MemberData Variable + { RoleID LLUUID } + { MemberID LLUUID } + } +} + +// GroupTitlesRequest +// viewer -> simulator -> dataserver +{ + GroupTitlesRequest Low 375 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + { GroupID LLUUID } + { RequestID LLUUID } + } +} + + +// GroupTitlesReply +// dataserver -> simulator -> viewer +{ + GroupTitlesReply Low 376 Trusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { GroupID LLUUID } + { RequestID LLUUID } + } + { + GroupData Variable + { Title Variable 1 } // string + { RoleID LLUUID } + { Selected BOOL } + } +} + +// GroupTitleUpdate +// viewer -> simulator -> dataserver +{ + GroupTitleUpdate Low 377 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + { GroupID LLUUID } + { TitleRoleID LLUUID } + } +} + +// GroupRoleUpdate +// viewer -> simulator -> dataserver +{ + GroupRoleUpdate Low 378 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + { GroupID LLUUID } + } + { + RoleData Variable + { RoleID LLUUID } + { Name Variable 1 } + { Description Variable 1 } + { Title Variable 1 } + { Powers U64 } + { UpdateType U8 } + } +} + + + +// Request the members of the live help group needed for requesting agent. +// userserver -> dataserver +{ + LiveHelpGroupRequest Low 379 Trusted Unencoded + { + RequestData Single + { RequestID LLUUID } + { AgentID LLUUID } + } +} + +// Send down the group +// dataserver -> userserver +{ + LiveHelpGroupReply Low 380 Trusted Unencoded + { + ReplyData Single + { RequestID LLUUID } + { GroupID LLUUID } + { Selection Variable 1 } // selection criteria all or active + } +} + +//----------------------------------------------------------------------------- +// Wearable messages +//----------------------------------------------------------------------------- + +// AgentWearablesRequest +// (a.k.a. "Tell me what the avatar is wearing.") +// viewer -> simulator -> dataserver +// reliable +{ + AgentWearablesRequest Low 381 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } +} + +// AgentWearablesUpdate +// (a.k.a. "Here's what your avatar should be wearing now.") +// dataserver -> userserver -> viewer +// reliable +// NEVER from viewer to sim +{ + AgentWearablesUpdate Low 382 Trusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + { SerialNum U32 } // U32, Increases every time the wearables change for a given agent. Used to avoid processing out of order packets. + } + { + WearableData Variable + { ItemID LLUUID } + { AssetID LLUUID } + { WearableType U8 } // U8, LLWearable::EWearType + } +} + +// +// AgentIsNowWearing +// (a.k.a. "Here's what I'm wearing now.") +// viewer->sim->dataserver +// reliable +{ + AgentIsNowWearing Low 383 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + WearableData Variable + { ItemID LLUUID } + { WearableType U8 } + } +} + + +// AgentCachedTexture +// viewer queries for cached textures on dataserver (via simulator) +// viewer -> simulator -> dataserver +// reliable +{ + AgentCachedTexture Low 384 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + { SerialNum S32 } + } + { + WearableData Variable + { ID LLUUID } + { TextureIndex U8 } + } +} + +// AgentCachedTextureResponse +// response to viewer queries for cached textures on dataserver (via simulator) +// dataserver -> simulator -> viewer +// reliable +{ + AgentCachedTextureResponse Low 385 Trusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + { SerialNum S32 } + } + { + WearableData Variable + { TextureID LLUUID } + { TextureIndex U8 } + { HostName Variable 1 } + } +} + +// Request an AgentDataUpdate without changing any agent data. +{ + AgentDataUpdateRequest Low 386 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } +} + +// AgentDataUpdate +// Updates a viewer or simulator's impression of agent-specific information. +// Used, for example, when an agent's group changes. +// dataserver -> simulator -> viewer +// reliable +{ + AgentDataUpdate Low 387 Trusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { FirstName Variable 1 } // string + { LastName Variable 1 } // string + { GroupTitle Variable 1 } // string + { ActiveGroupID LLUUID } // active group + { GroupPowers U64 } + { GroupName Variable 1 } // string + } +} + + +// GroupDataUpdate +// This is a bunch of group data that needs to be appropriatly routed based on presence info. +// dataserver -> simulator +{ + GroupDataUpdate Low 388 Trusted Zerocoded + { + AgentGroupData Variable + { AgentID LLUUID } + { GroupID LLUUID } + { AgentPowers U64 } + { GroupTitle Variable 1 } + } +} + +// AgentGroupDataUpdate +// Updates a viewer or simulator's impression of the groups an agent is in. +// dataserver -> simulator -> viewer +// reliable +{ + AgentGroupDataUpdate Low 389 Trusted Zerocoded UDPDeprecated + { + AgentData Single + { AgentID LLUUID } + } + { + GroupData Variable + { GroupID LLUUID } + { GroupPowers U64 } + { AcceptNotices BOOL } + { GroupInsigniaID LLUUID } + { Contribution S32 } + { GroupName Variable 1 } // string + } +} + +// AgentDropGroup +// Updates the viewer / simulator that an agent is no longer part of a group +// dataserver -> simulator -> viewer +// dataserver -> userserver +// reliable +{ + AgentDropGroup Low 390 Trusted Zerocoded UDPDeprecated + { + AgentData Single + { AgentID LLUUID } + { GroupID LLUUID } + } +} + +// LogTextMessage +// Asks the dataserver to log the contents of this message in the +// chat and IM log table. +// Sent from userserver (IM logging) and simulator (chat logging). +{ + LogTextMessage Low 391 Trusted Zerocoded + { + DataBlock Variable + { FromAgentId LLUUID } + { ToAgentId LLUUID } + { GlobalX F64 } + { GlobalY F64 } + { Time U32 } // utc seconds since epoch + { Message Variable 2 } // string + } +} + +// ViewerEffect +// Viewer side effect that's sent from one viewer, and broadcast to other agents nearby +// viewer-->sim (single effect created by viewer) +// sim-->viewer (multiple effects that can be seen by viewer) +// the AgentData block used for authentication for viewer-->sim messages +{ + ViewerEffect Medium 17 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + Effect Variable + { ID LLUUID } // unique UUID of the effect + { AgentID LLUUID } // yes, pack AgentID again (note this block is variable) + { Type U8 } // Type of the effect + { Duration F32 } // F32 time (seconds) + { Color Fixed 4 } // Color4U + { TypeData Variable 1 } // Type specific data + } +} + + +// CreateTrustedCircuit +// Sent to establish a trust relationship between two components. +// Only sent in response to a DenyTrustedCircuit message. +{ + CreateTrustedCircuit Low 392 NotTrusted Unencoded + { + DataBlock Single + { EndPointID LLUUID } + { Digest Fixed 32 } // 32 hex digits == 1 MD5 Digest + } +} + +// DenyTrustedCircuit +// Sent : +// - in response to failed CreateTrustedCircuit +// - to force the remote end-point to try to establish a trusted circuit +// - the reception of a trusted message on a non-trusted circuit +// This allows us to re-auth a circuit if it gets closed due to timeouts or network failures. +{ + DenyTrustedCircuit Low 393 NotTrusted Unencoded + { + DataBlock Single + { EndPointID LLUUID } + } +} + +// RequestTrustedCircuit +// If the destination does not trust the sender, a Deny is sent back. +{ + RequestTrustedCircuit Low 394 Trusted Unencoded +} + + +{ + RezSingleAttachmentFromInv Low 395 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + ObjectData Single + { ItemID LLUUID } + { OwnerID LLUUID } + { AttachmentPt U8 } // 0 for default + { ItemFlags U32 } + { GroupMask U32 } + { EveryoneMask U32 } + { NextOwnerMask U32 } + { Name Variable 1 } + { Description Variable 1 } + } +} + +{ + RezMultipleAttachmentsFromInv Low 396 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + HeaderData Single + { CompoundMsgID LLUUID } // All messages a single "compound msg" must have the same id + { TotalObjects U8 } + { FirstDetachAll BOOL } + } + { + ObjectData Variable // 1 to 4 of these per packet + { ItemID LLUUID } + { OwnerID LLUUID } + { AttachmentPt U8 } // 0 for default + { ItemFlags U32 } + { GroupMask U32 } + { EveryoneMask U32 } + { NextOwnerMask U32 } + { Name Variable 1 } + { Description Variable 1 } + } +} + + +{ + DetachAttachmentIntoInv Low 397 NotTrusted Unencoded + { + ObjectData Single + { AgentID LLUUID } + { ItemID LLUUID } + } +} + + +// Viewer -> Sim +// Used in "Make New Outfit" +{ + CreateNewOutfitAttachments Low 398 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + HeaderData Single + { NewFolderID LLUUID } + } + { + ObjectData Variable + { OldItemID LLUUID } + { OldFolderID LLUUID } + } +} + +//----------------------------------------------------------------------------- +// Personal information messages +//----------------------------------------------------------------------------- + +{ + UserInfoRequest Low 399 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } +} + +{ + UserInfoReply Low 400 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + } + { + UserData Single + { IMViaEMail BOOL } + { DirectoryVisibility Variable 1 } + { EMail Variable 2 } + } +} + +{ + UpdateUserInfo Low 401 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + UserData Single + { IMViaEMail BOOL } + { DirectoryVisibility Variable 1 } + } +} + + +//----------------------------------------------------------------------------- +// System operations and maintenance +//----------------------------------------------------------------------------- + + +// spaceserver -> sim +// tell a particular simulator to rename a parcel +{ + ParcelRename Low 402 Trusted Unencoded + { + ParcelData Variable + { ParcelID LLUUID } + { NewName Variable 1 } // string + } +} + + +// sim -> viewer +// initiate upload. primarily used for uploading raw files. +{ + InitiateDownload Low 403 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + } + { + FileData Single + { SimFilename Variable 1 } // string + { ViewerFilename Variable 1 } // string + } +} + +// Generalized system message. Each Requst has its own protocol for +// the StringData block format and contents. +{ + SystemMessage Low 404 Trusted Zerocoded + { + MethodData Single + { Method Variable 1 } + { Invoice LLUUID } + { Digest Fixed 32 } // 32 hex digits == 1 MD5 Digest + } + { + ParamList Variable + { Parameter Variable 1 } + } +} + + +//----------------------------------------------------------------------------- +// map messages +//----------------------------------------------------------------------------- + +// viewer -> sim +// reliable +// This message is sent up from the viewer to (eventually) get a list +// of all map layers and NULL-layer sims. +// Returns: MapLayerReply and MapBlockReply +{ + MapLayerRequest Low 405 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + { Flags U32 } + { EstateID U32 } // filled in on sim + { Godlike BOOL } // filled in on sim + } +} + +// sim -> viewer +{ + MapLayerReply Low 406 Trusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { Flags U32 } + } + { + LayerData Variable + { Left U32 } + { Right U32 } + { Top U32 } + { Bottom U32 } + { ImageID LLUUID } + } +} + +// viewer -> sim +// This message is sent up from the viewer to get a list +// of the sims in a specified region. +// Returns: MapBlockReply +{ + MapBlockRequest Low 407 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + { Flags U32 } + { EstateID U32 } // filled in on sim + { Godlike BOOL } // filled in on sim + } + { + PositionData Single + { MinX U16 } // in region-widths + { MaxX U16 } // in region-widths + { MinY U16 } // in region-widths + { MaxY U16 } // in region-widths + } +} + +// viewer -> sim +// This message is sent up from the viewer to get a list +// of the sims with a given name. +// Returns: MapBlockReply +{ + MapNameRequest Low 408 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + { Flags U32 } + { EstateID U32 } // filled in on sim + { Godlike BOOL } // filled in on sim + } + { + NameData Single + { Name Variable 1 } // string + } +} + +// sim -> viewer +{ + MapBlockReply Low 409 Trusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { Flags U32 } + } + { + Data Variable + { X U16 } // in region-widths + { Y U16 } // in region-widths + { Name Variable 1 } // string + { Access U8 } // PG, mature, etc. + { RegionFlags U32 } + { WaterHeight U8 } // meters + { Agents U8 } + { MapImageID LLUUID } + } +} + +// viewer -> sim +// This message is sent up from the viewer to get a list +// of the items of a particular type on the map. +// Used for Telehubs, Agents, Events, Popular Places, etc. +// Returns: MapBlockReply +{ + MapItemRequest Low 410 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + { Flags U32 } + { EstateID U32 } // filled in on sim + { Godlike BOOL } // filled in on sim + } + { + RequestData Single + { ItemType U32 } + { RegionHandle U64 } // filled in on sim + } +} + +// sim -> viewer +{ + MapItemReply Low 411 Trusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { Flags U32 } + } + { + RequestData Single + { ItemType U32 } + } + { + Data Variable + { X U32 } // global position + { Y U32 } // global position + { ID LLUUID } // identifier id + { Extra S32 } // extra information + { Extra2 S32 } // extra information + { Name Variable 1 } // identifier string + } +} + +//----------------------------------------------------------------------------- +// Postcard messages +//----------------------------------------------------------------------------- +// reliable +{ + SendPostcard Low 412 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + { AssetID LLUUID } + { PosGlobal LLVector3d } // Where snapshot was taken + { To Variable 1 } // dest email address(es) + { From Variable 1 } // src email address(es) + { Name Variable 1 } // src name + { Subject Variable 1 } // mail subject + { Msg Variable 2 } // message text + { AllowPublish BOOL } // Allow publishing on the web. + { MaturePublish BOOL } // profile is "mature" + } +} + +// RPC messages +// Script on simulator requests rpc channel from rpcserver +// simulator -> dataserver -> MySQL +{ + RpcChannelRequest Low 413 Trusted Unencoded + { + DataBlock Single + { GridX U32 } + { GridY U32 } + { TaskID LLUUID } + { ItemID LLUUID } + } +} + +// RpcServer allocated a session for the script +// ChannelID will be the NULL UUID if unable to register +// dataserver -> simulator +{ + RpcChannelReply Low 414 Trusted Unencoded + { + DataBlock Single + { TaskID LLUUID } + { ItemID LLUUID } + { ChannelID LLUUID } + } +} + +// Inbound RPC requests follow this path: +// RpcScriptRequestInbound: rpcserver -> spaceserver +// RpcScriptRequestInboundForward: spaceserver -> simulator +// reply: simulator -> rpcserver +{ + RpcScriptRequestInbound Low 415 NotTrusted Unencoded + { + TargetBlock Single + { GridX U32 } + { GridY U32 } + } + { + DataBlock Single + { TaskID LLUUID } + { ItemID LLUUID } + { ChannelID LLUUID } + { IntValue U32 } + { StringValue Variable 2 } // string + } +} + +// spaceserver -> simulator +{ + RpcScriptRequestInboundForward Low 416 Trusted Unencoded UDPDeprecated + { + DataBlock Single + { RPCServerIP IPADDR } + { RPCServerPort IPPORT } + { TaskID LLUUID } + { ItemID LLUUID } + { ChannelID LLUUID } + { IntValue U32 } + { StringValue Variable 2 } // string + } +} + +// simulator -> rpcserver +// Not trusted because trust establishment doesn't work here. +{ + RpcScriptReplyInbound Low 417 NotTrusted Unencoded + { + DataBlock Single + { TaskID LLUUID } + { ItemID LLUUID } + { ChannelID LLUUID } + { IntValue U32 } + { StringValue Variable 2 } // string + } +} + + +// ScriptMailRegistration +// Simulator -> dataserver +{ + ScriptMailRegistration Low 418 Trusted Unencoded + { + DataBlock Single + { TargetIP Variable 1 } // String IP + { TargetPort IPPORT } + { TaskID LLUUID } + { Flags U32 } + } +} + +// ParcelMediaCommandMessage +// Sends a parcel media command +{ + ParcelMediaCommandMessage Low 419 Trusted Unencoded + { + CommandBlock Single + { Flags U32 } + { Command U32 } + { Time F32 } + } +} + +// ParcelMediaUpdate +// Sends a parcel media update to a single user +// For global updates use the parcel manager. +{ + ParcelMediaUpdate Low 420 Trusted Unencoded + { + DataBlock Single + { MediaURL Variable 1 } // string + { MediaID LLUUID } + { MediaAutoScale U8 } + } + { + DataBlockExtended Single + { MediaType Variable 1 } + { MediaDesc Variable 1 } + { MediaWidth S32 } + { MediaHeight S32 } + { MediaLoop U8 } + } +} + +// LandStatRequest +// Sent by the viewer to request collider/script information for a parcel +{ + LandStatRequest Low 421 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + RequestData Single + { ReportType U32 } + { RequestFlags U32 } + { Filter Variable 1 } + { ParcelLocalID S32 } + } +} + +// LandStatReply +// Sent by the simulator in response to LandStatRequest +{ + LandStatReply Low 422 Trusted Unencoded UDPDeprecated + { + RequestData Single + { ReportType U32 } + { RequestFlags U32 } + { TotalObjectCount U32 } + } + { + ReportData Variable + { TaskLocalID U32 } + { TaskID LLUUID } + { LocationX F32 } + { LocationY F32 } + { LocationZ F32 } + { Score F32 } + { TaskName Variable 1 } + { OwnerName Variable 1 } + } +} + +// Generic Error -- this is used for sending an error message +// to a UDP recipient. The lowest common denominator is to at least +// log the message. More sophisticated receivers can do something +// smarter, for example, a money transaction failure can put up a +// more user visible UI widget. +{ + Error Low 423 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } // will forward to agentid if coming from trusted circuit + } + { + Data Single + { Code S32 } // matches http status codes + { Token Variable 1 } // some specific short string based message + { ID LLUUID } // the transactionid/uniqueid/sessionid whatever. + { System Variable 1 } // The hierarchical path to the system, eg, "message/handler" + { Message Variable 2 } // Human readable message + { Data Variable 2 } // Binary serialized LLSD for extra info. + } +} + +// ObjectIncludeInSearch +// viewer -> simulator +{ + ObjectIncludeInSearch Low 424 NotTrusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + ObjectData Variable + { ObjectLocalID U32 } + { IncludeInSearch BOOL } + } +} + + +// This message is sent from viewer -> simulator when the viewer wants +// to rez an object out of inventory back to its position before it +// last moved into the inventory +{ + RezRestoreToWorld Low 425 NotTrusted Unencoded UDPDeprecated + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + InventoryData Single + { ItemID LLUUID } + { FolderID LLUUID } + { CreatorID LLUUID } // permissions + { OwnerID LLUUID } // permissions + { GroupID LLUUID } // permissions + { BaseMask U32 } // permissions + { OwnerMask U32 } // permissions + { GroupMask U32 } // permissions + { EveryoneMask U32 } // permissions + { NextOwnerMask U32 } // permissions + { GroupOwned BOOL } // permissions + { TransactionID LLUUID } + { Type S8 } + { InvType S8 } + { Flags U32 } + { SaleType U8 } + { SalePrice S32 } + { Name Variable 1 } + { Description Variable 1 } + { CreationDate S32 } + { CRC U32 } + } +} + +// Link inventory +{ + LinkInventoryItem Low 426 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + InventoryBlock Single + { CallbackID U32 } // Async Response + { FolderID LLUUID } + { TransactionID LLUUID } // Going to become TransactionID + { OldItemID LLUUID } + { Type S8 } + { InvType S8 } + { Name Variable 1 } + { Description Variable 1 } + + } +} + +// RetrieveIMsExtended - extended version of RetrieveInstantMessages, +// used to get instant messages that were persisted out to the database while the user was offline +// sent between the simulator and dataserver +{ + RetrieveIMsExtended Low 427 Trusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + { IsPremium BOOL } + } +} + +// JoinGroupRequestExtended +// Extends JoinGroupRequest from viewer and passed to dataserver +// simulator -> dataserver +// reliable +{ + JoinGroupRequestExtended Low 428 Trusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + { GroupLimit S32 } + } + { + GroupData Single + { GroupID LLUUID } + } +} + +// CreateGroupRequestExtended +// simulator -> dataserver, extends data from CreateGroupRequest +// reliable +{ + CreateGroupRequestExtended Low 429 Trusted Unencoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + { GroupLimit S32 } + } + { + GroupData Single + { Name Variable 1 } // string + { Charter Variable 2 } // string + { ShowInList BOOL } + { InsigniaID LLUUID } + { MembershipFee S32 } // S32 + { OpenEnrollment BOOL } // BOOL (U8) + { AllowPublish BOOL } // whether profile is externally visible or not + { MaturePublish BOOL } // profile is "mature" + } +} \ No newline at end of file diff --git a/tools/parseMessageTemplate.js b/tools/parseMessageTemplate.js new file mode 100644 index 0000000..9c8086f --- /dev/null +++ b/tools/parseMessageTemplate.js @@ -0,0 +1,144 @@ +const fs = require('fs'); +let messageCount = 0; + +function getParams(str) +{ + let started = false; + let lastSpace = false; + let params = ''; + for(let i = 0; i < str.length; i++) + { + const c = str[i]; + if (c === '{' || c === '}') + { + return params.trim(); + } + else if (c === ' ' || c === '\t') + { + if (started && !lastSpace) + { + params+=' '; + lastSpace = true; + } + } + else if (c === '\n' || c === '\r') + { + //ignore + } + else + { + started = true; + lastSpace = false; + params += c; + } + } + return params.trim(); +} + +function getBlocks(str) +{ + let started = false; + let count = 0; + let startPos = 0; + let block = []; + for(let i = 0; i < str.length; i++) + { + if (str[i] === '{') + { + if (count === 0) + { + if (!started) + { + started = true; + startPos = i; + } + } + count++ + } + else if (str[i] === '}') + { + count--; + if (count === 0) + { + let s = str.substr(startPos+1, (i - startPos)-1); + block.push(s); + started = false; + } + } + } + return block; +} + +fs.readFile('./msg_template.msg', (err, data) => +{ + if (err) + { + console.error(err); + } + else + { + const msgTemplate = data.toString('ascii'); + let messages = getBlocks(msgTemplate); + let done = false; + let msgObjects = []; + messages.forEach((message) => + { + let newMessage = {}; + + let params = getParams(message); + + params = params.split(' '); + newMessage.name = params[0]; + newMessage.frequency = params[1]; + newMessage.id = params[2]; + newMessage.flags = []; + newMessage.blocks = []; + for(let i = 3; i < params.length; i++) + { + newMessage.flags.push(params[i]); + } + + let blocks = getBlocks(message); + blocks.forEach((block) => + { + let newBlock = {}; + params = getParams(block); + params = params.split(' '); + newBlock.name = params[0]; + newBlock.type = params[1]; + newBlock.count = 1; + newBlock.params = []; + if (params.length>2) + { + newBlock.count = params[2] + } + + let paramBlocks = getBlocks(block); + paramBlocks.forEach((paramBlock) => + { + let data = getParams(paramBlock); + data = data.split(' '); + + let obj = { + 'name': data[0], + 'type': data[1], + 'size': 1 + }; + if (data.length>2) + { + obj['size'] = data[2]; + } + newBlock.params.push(obj); + }); + + newMessage.blocks.push(newBlock); + }); + msgObjects.push(newMessage); + }); + + fs.writeFile('./msg_template.json', JSON.stringify(msgObjects), (err) => + { + console.log("JSON written"); + }); + } +}); \ No newline at end of file