ws-cleanup-types: image/pnm, model/*: type lookup tables, table.create results and literals; casts for known values

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
4DBugandClaude Opus 5.5 committed 2026-10-31 10:59:11 -05:00
1 parent 98b3957d51
commit 5ee6736c6e
23 files changed
+139 -137

No files matched your search

+2 -2
View File
@@ -157,7 +157,7 @@ function Write.build(scene: Types.Scene, opts: any?): string?
table.insert(out, s)
end
w('<?xml version="1.0" encoding="utf-8"?>\n<COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.1">\n')
local meta = scene.meta or {}
local meta: { [string]: any } = scene.meta or {}
local up = if meta.up == "z" then "Z_UP" elseif meta.up == "x" then "X_UP" else "Y_UP"
w(format('<asset><contributor><authoring_tool>formats-luau</authoring_tool></contributor><created>1970-01-01T00:00:00Z</created><modified>1970-01-01T00:00:00Z</modified><unit meter="%s" name="unit"/><up_axis>%s</up_axis></asset>\n', f(meta.unit or 1), up))
-- images
@@ -189,7 +189,7 @@ function Write.build(scene: Types.Scene, opts: any?): string?
w("<library_effects>\n")
for i, mat in scene.materials do
local ph: any = mat.extras and mat.extras.phong or {}
local params = {}
local params: { [any]: any } = {} -- the newparam strings, and their sids as seen-keys
local function texParam(ref: Types.TextureRef?): (string?, number?)
if not ref or not imageId[ref.texture] then
return nil, nil