- New events: ObjectPhysicsDataEvent, ParcelPropertiesEvent, NewObjectEvent, ObjectUpdateEvent, ObjectKilledEvent - Added getXML function to Color4, Vector2, Vector3, Vector4, GameObject, Region, Quaternion, UUID for opensim-compatible XML export - Added TextureAnim and ParticleSystem decoding to the "full" ObjectStore - Object store will automatically request missing "parent" prims - "setPersist" - When persist is TRUE, the ObjectStore will not forget about "killed" prims - useful for region scanning - Support for Flexible params, Light params, LightImage params, Mesh data, Sculpt maps - Fixed object scale being incorrectly calculated - Add terrain decoding (this was a ballache) - Add parcel map decoding - Add support for region windlight settings (region.environment) - Add support for materials (normal / specular maps) - Add getBuffer, getLong and bitwiseOr to UUID - Added a circular-reference-safe JSONStringify to Utils - Add XferFile capability to Circuit PUBLIC API: AssetCommands: - Rework "downloadAsset" to detect failures - NEW: downloadInventoryAsset() - uses TransferRequest for prim inventory items - NEW: getMaterials() - resolves material UUIDs RegionCommands: - NEW: getTerrainTextures() - NEW: exportSettings() - OpenSim XML export of region settings - NEW: async getTerrain() - Get binary terrain heightmap, 256x256 float32 - resolveObjects() - now fetches task inventory contents too. - resolveObjects() - fix calculation of land impact - NEW: getObjectByLocalID(localID: number, timeout: number) - NEW: getObjectByUUID(uuid: UUID, timeout: number) - NEW: getParcels(); - NEW: pruneObjects - removes missing GameObjects from a list - NEW: setPersist - prevent objectstore from forgetting about killed gameobjects
24 lines
724 B
TypeScript
24 lines
724 B
TypeScript
import {Vector3} from '../Vector3';
|
|
|
|
export class FlexibleData
|
|
{
|
|
Softness = 0;
|
|
Tension = 0.0;
|
|
Drag = 0.0;
|
|
Gravity = 0.0;
|
|
Wind = 0.0;
|
|
Force = Vector3.getZero();
|
|
|
|
constructor(buf: Buffer, pos: number, length: number)
|
|
{
|
|
if (length >= 5)
|
|
{
|
|
this.Softness = ((buf.readUInt8(pos) & 0x80) >> 6) | ((buf.readUInt8(pos + 1) & 0x80) >> 7);
|
|
this.Tension = (buf.readUInt8(pos++) & 0x7F) / 10.0;
|
|
this.Drag = (buf.readUInt8(pos++) & 0x7F) / 10.0;
|
|
this.Gravity = (buf.readUInt8(pos++) / 10.0) - 10.0;
|
|
this.Wind = (buf.readUInt8(pos++) / 10.0);
|
|
this.Force = new Vector3(buf, pos);
|
|
}
|
|
}
|
|
} |