mooball
    Preparing search index...

    Interface SandboxModeFunctions

    interface SandboxModeFunctions {
        addControl(name: string, keys: number[]): void;
        addDisc(data: AddDiscParams): void;
        addGoal(data: AddGoalParams): void;
        addJoint(data: AddJointParams): void;
        addPlane(data: AddPlaneParams): void;
        addPlayer(data: AddPlayerParams): void;
        addSegment(data: AddSegmentParams): void;
        addSpawnPoint(data: AddSpawnPointParams): void;
        addStadiumObject(type: number, value: object): void;
        addVertex(data: AddVertexParams): void;
        createDisc(data: CreateDiscParams): Disc;
        createGoal(data: CreateGoalParams): Goal;
        createJoint(data: CreateJointParams): Joint;
        createJointFromObj(data: CreateJointFromObjParams): Joint;
        createPlane(data: CreatePlaneParams): Plane;
        createSegment(data: CreateSegmentParams): Segment;
        createSegmentFromObj(data: CreateSegmentFromObjParams): Segment;
        createVertex(data: CreateVertexParams): Vertex;
        exportStadium(): object;
        findVertexIndicesOfSegment(idx: number): number[] | null;
        findVertexIndicesOfSegmentObj(obj: Segment): number[];
        playCustomSound(soundName: string): void;
        playerDirection(value: number): void;
        removeControl(name: string): void;
        removeDisc(idx: number): void;
        removeGoal(idx: number): void;
        removeJoint(idx: number): void;
        removePlane(idx: number): void;
        removePlayer(playerId: number): void;
        removeSegment(idx: number): void;
        removeSpawnPoint(idx: number, team: UnparsedTeam2): void;
        removeStadiumObject(type: number, id: number): void;
        removeVertex(idx: number): void;
        sendAnnouncement2(
            msg: string,
            cssVar?: string,
            sound?: string,
            targetId?: number,
        ): void;
        sendDirection(value: number): void;
        setClockPaused(value: number): void;
        setDirectionActive(value: number): void;
        setElapsedTime(value: number): void;
        setMaxEndTicks(value: number): void;
        setMaxGoalTicks(value: number): void;
        setMaxPauseTicks(value: number): void;
        setOvertimeLimit(value: number): void;
        setPlayerCssVar(id: number, cssVar: string | null): void;
        setPlayerDirection(id: number, value: number): void;
        setPlayerEnergy(id: number, data: number[]): void;
        setPlayerSkin(id: number, skin: Texture | null): void;
        setRoomName(name: string): void;
        setRunDefaultGameLogic(value: boolean): void;
        setTeamScore(teamId: number, value: number): void;
        updateCssVar(name: string, value: string): void;
        updateDisc(idx: number, data: UpdateDiscParams): void;
        updateDiscObj(discObj: Disc, data: UpdateDiscObjParams): void;
        updateGoal(idx: number, data: UpdateGoalParams): void;
        updateJoint(idx: number, data: UpdateJointParams): void;
        updatePlane(idx: number, data: UpdatePlaneParams): void;
        updatePlayer(playerId: number, data: UpdatePlayerParams): void;
        updateSegment(idx: number, data: UpdateSegmentParams): void;
        updateSpawnPoint(
            idx: number,
            team: UnparsedTeam2,
            data: UpdateSpawnPointParams,
        ): void;
        updateStadiumBg(data: UpdateStadiumBgParams): void;
        updateStadiumGeneral(data: UpdateStadiumGeneralParams): void;
        updateStadiumObject(type: number, id: number, value: object): void;
        updateStadiumPlayerPhysics(data: UpdateStadiumPlayerPhysicsParams): void;
        updateVertex(idx: number, data: UpdateVertexParams): void;
    }
    Index

    Methods

    • Introduces a new game input control and assigns it to the next bit of player.input value.

      Parameters

      • name: string

        Unique name of the input control.

      • keys: number[]

        Keycodes for the default keys of this input control.

      Returns void

      void.

    • Creates a disc object and adds it to the current stadium.

      Parameters

      • data: AddDiscParams

        An object with the following structure:

        • pos: [x: number, y: number]: The position of the new disc.
        • speed: [x: number, y: number] | null: The speed of the new disc.
        • gravity: [x: number, y: number] | null: The gravity (acceleration) of the new disc.
        • radius: number: The radius of the new disc.
        • invMass: number | null: The inverse mass of the new disc.
        • damping: number | null: The damping of the new disc.
        • color: "transparent" | string | [r: int, g: int, b: int] | null: The color of the new disc.
        • bCoef: number | null: The bouncing coefficient of the new disc.
        • cMask: string[] | null: The collision mask of the new disc.
        • cGroup: string[] | null: The collision group of the new disc.

      Returns void

      void.

    • Creates a goal object and adds it to the current stadium.

      Parameters

      • data: AddGoalParams

        An object with the following structure:

        • p0: [x: number, y: number]: The starting point of the new goal object.
        • p1: [x: number, y: number]: The ending point of the new goal object.
        • team: "red" | "blue": The team of the new goal object.

      Returns void

      void.

    • Creates a joint object and adds it to the current stadium.

      Parameters

      • data: AddJointParams

        An object with the following structure:

        • d0: int: The first disc index of the new joint.
        • d1: int: The second disc index of the new joint.
        • color: "transparent" | string | [r: int, g: int, b: int] | null: The color of the new joint.
        • strength: "rigid" | number | null: The strengh of the new joint.
        • length: number | [min: number, max: number] | null: The length of the new joint.

      Returns void

      void.

    • Creates a plane object and adds it to the current stadium.

      Parameters

      • data: AddPlaneParams

        An object with the following structure:

        • normal: [x: number, y: number]: The normal of the new plane. This value is normalized automatically.
        • dist: number: The distance of the new plane to the origin(0,0).
        • bCoef: number | null: The bouncing coefficient of the new plane.
        • cMask: string[] | null: The collision mask of the new plane.
        • cGroup: string[] | null: The collision group of the new plane.

      Returns void

      void.

    • Adds a player with given properties to the current stadium.

      Parameters

      • data: AddPlayerParams

        An object with the following structure:

        • id: int: The id the new player. Already existing ids should not be used. 0 < id < 65535.
        • name: string: The name of the new player.
        • avatar: string: The avatar of the new player.
        • flag: string: The country code of the new player.
        • team: "spec" | "red" | "blue": The team of the new player. If this is "spec", the keys after this are ignored. Otherwise, player is moved to the specified team, a player disc is automatically generated and the below values are applied to the new disc.
        • pos: [x: number, y: number] | null: The position of the new player. Team must not be "spec".
        • speed: [x: number, y: number] | null: The speed of the new player. Team must not be "spec".
        • gravity: [x: number, y: number] | null: The gravity (acceleration) of the new player. Team must not be "spec".
        • radius: number | null: The radius of the new player. Team must not be "spec".
        • invMass: number | null: The inverse mass of the new player. Team must not be "spec".
        • damping: number | null: The damping of the new player. Team must not be "spec".
        • bCoef: number | null: The bouncing coefficient of the new player. Team must not be "spec".
        • cMask: string[] | null: The collision mask of the new player. Team must not be "spec".
        • cGroup: string[] | null: The collision group of the new player. Team must not be "spec".

      Returns void

      void.

    • Creates a segment object using vertex indices and adds it to the current stadium. The vertices must exist at the given indices in the vertices array of the current room.

      Parameters

      • data: AddSegmentParams

        An object with the following structure:

        • v0: int: Index of the first vertex of the new segment.
        • v1: int: Index of the second vertex of the new segment.
        • color: "transparent" | string | [r: int, g: int, b: int] | null: Color of the new segment.
        • bias: number | null: Bias of the new segment.
        • curve: number | null: Curve of the new segment. (unit: angles)
        • curveF: number | null: Curve of the new segment. (unit: radians) While modifying this, the engine does not update some values. Only use this if you know what you are doing.
        • vis: boolean | null: Visibility of the new segment.
        • bCoef: number | null: Bouncing coefficient of the new segment.
        • cMask: string[] | null: Collision mask of the new segment.
        • cGroup: string[] | null: Collision group of the new segment.

      Returns void

      void.

    • Adds a spawn point with given coordinate to the given team in the current stadium.

      Parameters

      • data: AddSpawnPointParams

        An object with the following structure:

        • x: number: The x coordinate of the new spawn point.
        • y: number: The y coordinate of the new spawn point.
        • team: "red" | "blue": The team of the new spawn point.

      Returns void

      void.

    • Adds a new stadium object.

      Parameters

      • type: number

        Type of the object to be added.

      • value: object

        An object that is supposed to contain all parameters required to add that type of object.

      Returns void

      void.

    • Creates a vertex object and adds it to the current stadium.

      Parameters

      • data: AddVertexParams

        An object with the following structure:

        • x: number: The x component of the position of the new vertex.
        • y: number: The y component of the position of the new vertex.
        • bCoef: number | null: The bouncing coefficient of the new vertex.
        • cMask: string[] | null: The collision mask of the new vertex.
        • cGroup: string[] | null: The collision group of the new vertex.

      Returns void

      void.

    • Creates a disc object in memory and returns it.

      Parameters

      • data: CreateDiscParams

        An object with the following structure:

        • pos: [x: number, y: number]: The position of the new disc.
        • speed: [x: number, y: number] | null: The speed of the new disc.
        • gravity: [x: number, y: number] | null: The gravity (acceleration) of the new disc.
        • radius: number: The radius of the new disc.
        • invMass: number | null: The inverse mass of the new disc.
        • damping: number | null: The damping of the new disc.
        • color: "transparent" | string | [r: int, g: int, b: int] | null: The color of the new disc.
        • bCoef: number | null: The bouncing coefficient of the new disc.
        • cMask: string[] | null: The collision mask of the new disc.
        • cGroup: string[] | null: The collision group of the new disc.

      Returns Disc

      A Disc object.

    • Creates a goal object in memory and returns it.

      Parameters

      • data: CreateGoalParams

        An object with the following structure:

        • p0: [x: number, y: number]: The starting point of the new goal object.
        • p1: [x: number, y: number]: The ending point of the new goal object.
        • team: "red" | "blue": The team of the new goal object.

      Returns Goal

      A Goal object.

    • Creates a joint object in memory using disc indices and returns it.

      Parameters

      • data: CreateJointParams

        An object with the following structure:

        • d0: int: The first disc index of the new joint.
        • d1: int: The second disc index of the new joint.
        • color: "transparent" | string | [r: int, g: int, b: int] | null: The color of the new joint.
        • strength: "rigid" | number | null: The strengh of the new joint.
        • length: number | [min: number, max: number] | null: The length of the new joint.

      Returns Joint

      A Joint object.

    • Creates a joint object in memory using disc objects and returns it.

      Parameters

      • data: CreateJointFromObjParams

        An object with the following structure:

        • d0: Disc: The first disc of the new joint.
        • d1: Disc: The second disc of the new joint.
        • color: "transparent" | string | [r: int, g: int, b: int] | null: The color of the new joint.
        • strength: "rigid" | number | null: The strength of the new joint.
        • length: number | [min: number, max: number] | null: The length of the new joint.

      Returns Joint

      A Joint object.

    • Creates a plane object in memory and returns it.

      Parameters

      • data: CreatePlaneParams

        An object with the following structure:

        • normal: [x: number, y: number]: The normal of the new plane. This value is normalized automatically.
        • dist: number: The distance of the new plane to the origin(0,0).
        • bCoef: number | null: The bouncing coefficient of the new plane.
        • cMask: string[] | null: The collision mask of the new plane.
        • cGroup: string[] | null: The collision group of the new plane.

      Returns Plane

      A Plane object.

    • Creates a segment object in memory using vertex indices and returns it. The vertices must exist at the given indices in the vertices array of the current room.

      Parameters

      • data: CreateSegmentParams

        An object with the following structure:

        • v0: int: Index of the first vertex of the new segment.
        • v1: int: Index of the second vertex of the new segment.
        • color: "transparent" | string | [r: int, g: int, b: int] | null: Color of the new segment.
        • bias: number | null: Bias of the new segment.
        • curve: number | null: Curve of the new segment. (unit: angles)
        • curveF: number | null: Curve of the new segment. (unit: radians) While modifying this, the engine does not update some values. Only use this if you know what you are doing.
        • vis: boolean | null: Visibility of the new segment.
        • bCoef: number | null: Bouncing coefficient of the new segment.
        • cMask: string[] | null: Collision mask of the new segment.
        • cGroup: string[] | null: Collision group of the new segment.

      Returns Segment

      A Segment object.

    • Creates a segment object in memory using vertex objects and returns it.

      Parameters

      • data: CreateSegmentFromObjParams

        An object with the following structure:

        • v0: Vertex: First vertex of the new segment.
        • v1: Vertex: Second vertex of the new segment.
        • color: "transparent" | string | [r: int, g: int, b: int] | null: Color of the new segment.
        • bias: number | null: Bias of the new segment.
        • curve: number | null: Curve of the new segment. (unit: angles)
        • curveF: number | null: Curve of the new segment. (unit: radians) While modifying this, the engine does not update some values. Only use this if you know what you are doing.
        • vis: boolean | null: Visibility of the new segment.
        • bCoef: number | null: Bouncing coefficient of the new segment.
        • cMask: string[] | null: Collision mask of the new segment.
        • cGroup: string[] | null: Collision group of the new segment.

      Returns Segment

      A Segment object.

    • Creates a vertex object in memory and returns it.

      Parameters

      • data: CreateVertexParams

        An object with the following structure:

        • x: number: The x component of the position of the new vertex.
        • y: number: The y component of the position of the new vertex.
        • bCoef: number | null: The bouncing coefficient of the new vertex.
        • cMask: string[] | null: The collision mask of the new vertex.
        • cGroup: string[] | null: The collision group of the new vertex.

      Returns Vertex

      A Vertex object.

    • Returns all current game objects in hbs/json format. Note that the values written here are the currently active values, not the static and stored ones.

      Returns object

      A json object that represents all objects in the current stadium.

    • Returns the indices of vertices that form a segment.

      Parameters

      • idx: number

        The index of the segment that contain the vertices whose indices we are trying to find.

      Returns number[] | null

      An array in this format: [index1: int, index2: int]. index1 and index2 are the indices of the 1st and 2nd vertices of the queried segment. Returns null if the segment does not exist.

    • Returns the indices of vertices that form a segment.

      Parameters

      • obj: Segment

        The segment that contain the vertices whose indices we are trying to find.

      Returns number[]

      An array in this format: [index1: int, index2: int]. index1 and index2 are the indices of the 1st and 2nd vertices of the queried segment.

    • Plays a custom sound.

      Parameters

      • soundName: string

        Name of the sound to be played.

      Returns void

      void.

    • Sets the player's current direction. room.state.directionActive must be true for this to work.

      Parameters

      • value: number

        New direction value of the current player.

      Returns void

      void.

    • Remove an existing game input control. This function might break the game input logic completely.

      Parameters

      • name: string

        Unique name of the input control to be removed.

      Returns void

      void.

    • Removes a disc from the current room.

      Parameters

      • idx: number

        Index of the disc to remove.

      Returns void

      void.

    • Removes a goal from the current room.

      Parameters

      • idx: number

        Index of the goal to remove.

      Returns void

      void.

    • Removes a joint from the current room.

      Parameters

      • idx: number

        Index of the joint to remove.

      Returns void

      void.

    • Removes a plane from the current room.

      Parameters

      • idx: number

        Index of the plane to remove.

      Returns void

      void.

    • Removes a player from the current room.

      Parameters

      • playerId: number

        Id of the player to remove.

      Returns void

      void.

    • Removes a segment from the current room.

      Parameters

      • idx: number

        Index of the segment to remove.

      Returns void

      void.

    • Removes a spawn point from the current room.

      Parameters

      • idx: number

        Index of the spawn point to remove.

      • team: UnparsedTeam2

        The team that the spawn point belongs to.

      Returns void

      void.

    • Removes an existing stadium object.

      Parameters

      • type: number

        Type of the object to be removed.

      • id: number

        Id of the object to be removed.

      Returns void

      An instance of StadiumRemoveObjectEvent.

    • Removes a vertex from the current room.

      Parameters

      • idx: number

        Index of the vertex to remove.

      Returns void

      void.

    • Sends an announcement using the improved announcement api.

      Parameters

      • msg: string

        The announcement message. ( max length = 1000 )

      • OptionalcssVar: string

        The cssVar of the announcement message.

      • Optionalsound: string

        The sound of the announcement message.

      • OptionaltargetId: number

        Id of the player who will receive this announcement. If this value is null, the announcement is sent to everyone.

      Returns void

      void.

    • Sets the player's current direction. room.state.directionActive must be true for this to work.

      Parameters

      • value: number

        New direction value of the current player.

      Returns void

      void

    • Manually pause/resume the game clock.

      Parameters

      • value: number

        Whether the game will be paused(1) or resumed(0).

      Returns void

      void.

    • Manually set whether direction is active or not.

      Parameters

      • value: number

        New directionActive value.

      Returns void

      void.

    • Manually sets the current elapsed time.

      Parameters

      • value: number

        New elapsed time value.

      Returns void

      void.

    • Manually set the current max end ticks.

      Parameters

      • value: number

        New max end ticks value.

      Returns void

      void.

    • Manually sets the current max goal ticks.

      Parameters

      • value: number

        New max goal ticks value.

      Returns void

      void.

    • Manually set the current max pause ticks.

      Parameters

      • value: number

        New max pause ticks value.

      Returns void

      void.

    • Sets the overtime limit.

      Parameters

      • value: number

        The desired overtime limit of the game.

      Returns void

      void.

    • Sets the cssVar attribute of a player to change its appearance in the room gui.

      Parameters

      • id: number

        Id of the player whose cssVar will be modified.

      • cssVar: string | null

        New cssVar value of the player.

      Returns void

      void.

    • Manually change the direction of an individual player. room.state.directionActive must be true for this to work.

      Parameters

      • id: number

        Id of the player whose energy values will be modified.

      • value: number

        New direction value of the player.

      Returns void

      void.

    • Manually changes the energy of an individual player.

      Parameters

      • id: number

        Id of the player whose energy values will be modified.

      • data: number[]

        New values. Order of values is supposed to be: [energy, kEnergyGain, kEnergyDrain]. null means no change for each value.

      Returns void

      void.

    • Updates the current skin(textureId) of a player.

      Parameters

      • id: number

        Id of the player whose skin will be modified.

      • skin: Texture | null

        New skin value of the player.

      Returns void

      void.

    • Changes the name of the room.

      Parameters

      • name: string

        The new room name.

      Returns void

      void.

    • Sets whether to use default game logic or not.

      Parameters

      • value: boolean

        Whether the default game logic is active(1) or passive(0).

      Returns void

      void.

    • Manually set the current team scores.

      Parameters

      • teamId: number

        Id of the team whose score is desired to be changed.

      • value: number

        New score for the team.

      Returns void

      void.

    • Updates the current contents of a css variable.

      Parameters

      • name: string

        Name of the css variable..

      • value: string

        New value of the css variable.

      Returns void

      void.

    • Updates the idxth disc's only the given values.

      Parameters

      • idx: number

        Index of the disc that is desired to be updated.

      • data: UpdateDiscParams

        An object with the following structure:

        • pos: [x: number, y: number] | null: The new position of the disc.
        • speed: [x: number, y: number] | null: The new speed of the disc.
        • gravity: [x: number, y: number] | null: The new gravity (acceleration) of the disc.
        • radius: number | null: The new radius of the disc.
        • invMass: number | null: The new inverse mass of the disc.
        • damping: number | null: The new damping of the disc.
        • color: "transparent" | string | [r: int, g: int, b: int] | null: The new color of the disc.
        • bCoef: number | null: The new bouncing coefficient of the disc.
        • cMask: string[] | null: The new collision mask of the disc.
        • cGroup: string[] | null: The new collision group of the disc.

      Returns void

      void.

    • Updates the given disc object(discObj)'s only the given values.

      Parameters

      • discObj: Disc

        The disc that is desired to be updated.

      • data: UpdateDiscObjParams

        An object with the following structure:

        • pos: [x: number, y: number] | null: The new position of the disc.
        • speed: [x: number, y: number] | null: The new speed of the disc.
        • gravity: [x: number, y: number] | null: The new gravity (acceleration) of the disc.
        • radius: number | null: The new radius of the disc.
        • invMass: number | null: The new inverse mass of the disc.
        • damping: number | null: The new damping of the disc.
        • color: "transparent" | string | [r: int, g: int, b: int] | null: The new color of the disc.
        • bCoef: number | null: The new bouncing coefficient of the disc.
        • cMask: string[] | null: The new collision mask of the disc.
        • cGroup: string[] | null: The new collision group of the disc.

      Returns void

      void.

    • Updates the idxth goal's only the given values.

      Parameters

      • idx: number

        Index of the goal that is desired to be updated.

      • data: UpdateGoalParams

        An object with the following structure:

        • p0: [x: number, y: number] | null: The new first point of the goal.
        • p1: [x: number, y: number] | null: The new second point of the goal.
        • team: "red" | "blue" | null: The new team of the goal.

      Returns void

      void.

    • Updates the idxth joint's only the given values.

      Parameters

      • idx: number

        Index of the joint that is desired to be updated.

      • data: UpdateJointParams

        An object with the following structure:

        • d0: int | null: The new first disc index of the joint.
        • d1: int | null: The new second disc index of the joint.
        • color: "transparent" | string | [r: int, g: int, b: int] | null: The new color of the joint.
        • strength: "rigid" | number | null: The new strength of the joint.
        • length: number | [min: number, max: number] | null: The new length of the joint.

      Returns void

      void.

    • Updates the idxth plane's only the given values.

      Parameters

      • idx: number

        Index of the plane that is desired to be updated.

      • data: UpdatePlaneParams

        An object with the following structure:

        • normal: [x: number, y: number] | null: The new normal of the plane. This value is normalized automatically.
        • dist: number | null: The new distance of the plane to the origin. (0, 0)
        • bCoef: number | null: The new bouncing coefficient of the plane.
        • cMask: string[] | null: The new collision mask of the plane.
        • cGroup: string[] | null: The new collision group of the plane.

      Returns void

      void.

    • Updates the player(playerId)'s only the given values.

      Parameters

      • playerId: number

        Id of the player that is desired to be updated.

      • data: UpdatePlayerParams

        An object with the following structure:

        • name: string | null: The new name of the player.
        • avatar: string | null: The new avatar of the player.
        • flag: string | null: The new flag of the player.
        • team: "spec" | "red" | "blue" | null: The new team of the player.
        • pos: [x: number, y: number] | null: The new position of the player.
        • speed: [x: number, y: number] | null: The new speed of the player.
        • gravity: [x: number, y: number] | null: The new gravity (acceleration) of the player.
        • radius: number | null: The new radius of the player.
        • invMass: number | null: The new inverse mass of the player.
        • damping: number | null: The new damping of the player.
        • bCoef: number | null: The new bouncing coefficient of the player.
        • cMask: string[] | null: The new collision mask of the player.
        • cGroup: string[] | null: The new collision group of the player.

      Returns void

      void.

    • Updates the idxth segment's only the given values.

      Parameters

      • idx: number

        Index of the segment that is desired to be updated.

      • data: UpdateSegmentParams

        An object with the following structure:

        • v0: int | null: The new first vertex index of the segment.
        • v1: int | null: The new second vertex index of the segment.
        • color: "transparent" | string | [r: int, g: int, b: int] | null: The new color of the segment.
        • bias: number | null: The new bias of the segment.
        • curve: number | null: The new curve of the segment. (unit: degrees)
        • curveF: number | null: The new curve of the segment. (unit: radians) While modifying this, the engine does not update some values. Only use this if you know what you are doing.
        • vis: boolean | null: The new visibility of the segment.
        • bCoef: number | null: The new bouncing coefficient of the segment.
        • cMask: string[] | null: The new collision mask of the segment.
        • cGroup: string[] | null: The new collision group of the segment.

      Returns void

      void.

    • Updates the idxth spawn point in team(team) using only the given values.

      Parameters

      • idx: number

        Index of the spawn point that is desired to be updated.

      • team: UnparsedTeam2

        Current team of the spawn point that is desired to be updated.

      • data: UpdateSpawnPointParams

        An object with the following structure:

        • x: number | null: The new x coordinate of the spawn point.
        • y: number | null: The new y coordinate of the spawn point.
        • team: "red" | "blue" | null: The new team of the spawn point.

      Returns void

      void.

    • Updates the current stadium's only the given background values.

      Parameters

      • data: UpdateStadiumBgParams

        An object with the following structure:

        • type: 0 | 1 | 2 | null: The new background type of the current stadium. (0: "none", 1: "grass", 2: "hockey")
        • width: number | null: The new background width of the current stadium.
        • height: number | null: The new background height of the current stadium.
        • kickOffRadius: number | null: The new kick-off radius of the current stadium.
        • cornerRadius: number | null: The new background corner radius of the current stadium.
        • color: "transparent" | string | [r: number, g: number, b: number] | null: The new background color of the current stadium.
        • goalLine: number | null: The new goal line distance of the current stadium.

      Returns void

      void.

    • Updates the current stadium's only the given general values.

      Parameters

      • data: UpdateStadiumGeneralParams

        An object with the following structure:

        • name: string | null: The new name of the current stadium.
        • width: number | null: The new width of the current stadium.
        • height: number | null: The new height of the current stadium.
        • maxViewWidth: number | null: The new max view width of the current stadium.
        • cameraFollow: 0 | 1 | null: The new camera follow value of the current stadium. (0: "", 1: "player")
        • spawnDistance: number | null: The new spawn distance value of the current stadium.
        • kickOffReset: boolean | null: The new kick-off reset value of the current stadium. true: "full", false: "partial"
        • canBeStored: boolean | null: The new can-be-stored value of the current stadium.

      Returns void

      void.

    • Updates an existing stadium object.

      Parameters

      • type: number

        Type of the object to be updated.

      • id: number

        Id of the object to be updated.

      • value: object

        An object that is supposed to contain all parameters required to update that type of object.

      Returns void

      void.

    • Updates the current stadium's only the given player physics values.

      Parameters

      • data: UpdateStadiumPlayerPhysicsParams

        An object with the following structure:

        • radius: number | null: The new radius value of the player physics of the current stadium.
        • gravity: [x: number, y: number] | null: The new gravity (acceleration) value of the player physics of the current stadium.
        • invMass: number | null: The new inverse mass value of the player physics of the current stadium.
        • bCoef: number | null: The new bouncing coefficient value of the player physics of the current stadium.
        • cGroup: string[] | null: The new collision group value of the player physics of the current stadium.
        • damping: number | null: The new damping value of the player physics of the current stadium.
        • kickingDamping: number | null: The new kicking damping value of the player physics of the current stadium.
        • acceleration: number | null: The new acceleration value of the player physics of the current stadium.
        • kickingAcceleration: number | null: The new kickingAcceleration value of the player physics of the current stadium.
        • kickStrength: number | null: The new kick strength value of the player physics of the current stadium.
        • kickback: number | null: The new kick back value of the player physics of the current stadium.

      Returns void

      void.

    • Updates the idxth vertex's only the given values.

      Parameters

      • idx: number

        Index of the vertex that is desired to be updated.

      • data: UpdateVertexParams

        An object with the following structure:

        • x: number | null: The new x coordinate of the vertex.
        • y: number | null: The new y coordinate of the vertex.
        • bCoef: number | null: The new bouncing coefficient of the vertex.
        • cMask: string[] | null: The new collision mask of the vertex.
        • cGroup: string[] | null: The new collision group of the vertex.

      Returns void

      void.