commit
a8df71e9e4
|
|
@ -3226,7 +3226,8 @@ declare class PathWaypoint
|
||||||
end
|
end
|
||||||
|
|
||||||
declare class CFrame
|
declare class CFrame
|
||||||
LookVector: Vector3
|
lookVector: Vector3
|
||||||
|
LookVector: Vector3 -- ?
|
||||||
Position: Vector3
|
Position: Vector3
|
||||||
RightVector: Vector3
|
RightVector: Vector3
|
||||||
Rotation: CFrame
|
Rotation: CFrame
|
||||||
|
|
@ -5661,6 +5662,9 @@ declare class InsertService extends Instance
|
||||||
function LoadLocalAsset(self, assetPath: string): Instance
|
function LoadLocalAsset(self, assetPath: string): Instance
|
||||||
function LoadPackageAsset(self, url: Content): { Instance }
|
function LoadPackageAsset(self, url: Content): { Instance }
|
||||||
function LoadPackageAssetAsync(self, url: Content): { Instance }
|
function LoadPackageAssetAsync(self, url: Content): { Instance }
|
||||||
|
|
||||||
|
function SetAssetUrl(self, assetUrl: Content): nil
|
||||||
|
function SetAssetVersionUrl(self, assetVersionUrl: Content): nil
|
||||||
end
|
end
|
||||||
|
|
||||||
declare class JointInstance extends Instance
|
declare class JointInstance extends Instance
|
||||||
|
|
|
||||||
|
|
@ -54,8 +54,8 @@ ContentProvider:SetThreadPool(16)
|
||||||
InsertService:SetBaseSetsUrl "http://banland.xyz/game/tools/insertasset?nsets=10&type=base"
|
InsertService:SetBaseSetsUrl "http://banland.xyz/game/tools/insertasset?nsets=10&type=base"
|
||||||
InsertService:SetUserSetsUrl "http://banland.xyz/game/tools/insertasset?nsets=20&type=user&userid=%d"
|
InsertService:SetUserSetsUrl "http://banland.xyz/game/tools/insertasset?nsets=20&type=user&userid=%d"
|
||||||
InsertService:SetCollectionUrl "http://banland.xyz/game/tools/insertasset?sid=%d"
|
InsertService:SetCollectionUrl "http://banland.xyz/game/tools/insertasset?sid=%d"
|
||||||
InsertService:SetAssetUrl "http://banland.xyz/Asset/?id=%d"
|
InsertService:SetAssetUrl "http://banland.xyz/asset?id=%d"
|
||||||
InsertService:SetAssetVersionUrl "http://banland.xyz/Asset/?assetversionid=%d"
|
InsertService:SetAssetVersionUrl "http://banland.xyz/asset?assetversionid=%d"
|
||||||
|
|
||||||
pcall(function()
|
pcall(function()
|
||||||
SocialService:SetFriendUrl "http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=IsFriendsWith&playerid=%d&userid=%d"
|
SocialService:SetFriendUrl "http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=IsFriendsWith&playerid=%d&userid=%d"
|
||||||
|
|
|
||||||
|
|
@ -51,10 +51,36 @@ if gear then
|
||||||
player.Character.Torso["Right Shoulder"].CurrentAngle = math.rad(90)
|
player.Character.Torso["Right Shoulder"].CurrentAngle = math.rad(90)
|
||||||
end
|
end
|
||||||
|
|
||||||
local click = ThumbnailGenerator:Click("PNG", 420, 420, true)
|
local clickBody = ThumbnailGenerator:Click("PNG", 840, 840, true)
|
||||||
|
|
||||||
local result = '{"Status": "Completed", "Click": "' .. tostring(click) .. '"}'
|
print("[" .. game.JobId .. "] Rendered bodyshot")
|
||||||
print("[" .. game.JobId .. "] Successfully rendered, moving on...")
|
|
||||||
|
player.Character.Torso["Right Shoulder"].CurrentAngle = 0
|
||||||
|
|
||||||
|
-- Headshot Camera
|
||||||
|
local FOV = 52.5
|
||||||
|
|
||||||
|
local CameraAngle = player.Character.Head.CFrame
|
||||||
|
local CameraPosition = CameraAngle
|
||||||
|
+ CFrame.Angles(0, math.pi, 0).lookVector.unit * 2.75
|
||||||
|
|
||||||
|
local Camera = Instance.new "Camera"
|
||||||
|
Camera.Name = "ThumbnailCamera"
|
||||||
|
Camera.CameraType = Enum.CameraType.Scriptable
|
||||||
|
Camera.CoordinateFrame = CFrame.new(CameraPosition.p, CameraAngle.p)
|
||||||
|
Camera.FieldOfView = FOV
|
||||||
|
Camera.Parent = player.Character
|
||||||
|
workspace.CurrentCamera = Camera
|
||||||
|
|
||||||
|
local clickHead = ThumbnailGenerator:Click("PNG", 300, 300, true)
|
||||||
|
|
||||||
|
local result = '{"Status": "Completed", "ClickBody": "'
|
||||||
|
.. tostring(clickBody)
|
||||||
|
.. '", "ClickHead": "'
|
||||||
|
.. tostring(clickHead)
|
||||||
|
.. '"}'
|
||||||
|
|
||||||
|
print("[" .. game.JobId .. "] Rendered headshot")
|
||||||
|
|
||||||
while true do
|
while true do
|
||||||
local ok, err = pcall(function()
|
local ok, err = pcall(function()
|
||||||
|
|
|
||||||
|
|
@ -14,10 +14,8 @@ local ScriptContext = game:GetService "ScriptContext"
|
||||||
|
|
||||||
pcall(function()
|
pcall(function()
|
||||||
ContentProvider:SetBaseUrl(baseUrl)
|
ContentProvider:SetBaseUrl(baseUrl)
|
||||||
InsertService:SetAssetUrl(baseUrl .. "/asset/assetfetch?id=%d")
|
InsertService:SetAssetUrl(baseUrl .. "/asset?id=%d")
|
||||||
InsertService:SetAssetVersionUrl(
|
InsertService:SetAssetVersionUrl(baseUrl .. "/asset?assetversionid=%d")
|
||||||
baseUrl .. "/asset/assetfetch?assetversionid=%d"
|
|
||||||
)
|
|
||||||
end)
|
end)
|
||||||
|
|
||||||
HttpService.HttpEnabled = true
|
HttpService.HttpEnabled = true
|
||||||
|
|
@ -46,6 +44,8 @@ local player = game:GetService("Players"):CreateLocalPlayer(0)
|
||||||
player.CharacterAppearance = baseUrl
|
player.CharacterAppearance = baseUrl
|
||||||
.. "/api/render/characterasset?id="
|
.. "/api/render/characterasset?id="
|
||||||
.. assetId
|
.. assetId
|
||||||
|
.. "&apiKey="
|
||||||
|
.. thumbnailKey
|
||||||
player:LoadCharacter(false)
|
player:LoadCharacter(false)
|
||||||
|
|
||||||
-- Raise up the character's arm if they have gear.
|
-- Raise up the character's arm if they have gear.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue