@pix3/cli 1.6.2 → 1.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/runtime-types.json +1 -1
- package/dist/smoke/prebuilt/{chunk-7MZGPAUK.mjs → chunk-CBFYKDS7.mjs} +1 -1
- package/dist/smoke/prebuilt/chunk-VJHJ5BCO.mjs +239 -0
- package/dist/smoke/prebuilt/runtime.mjs +1 -1
- package/dist/smoke/prebuilt/smoke-worker.mjs +1 -1
- package/dist/smoke/prebuilt/tree-defaults.mjs +1 -1
- package/dist/validate/prebuilt/bundle-main.js +1 -1
- package/dist/validate/prebuilt/chunk-CFQFEI52.js +239 -0
- package/dist/validate/prebuilt/runtime.js +1 -1
- package/kit/files/.claude/skills/pix3-nodes/SKILL.md +1 -1
- package/kit/files/.claude/skills/pix3-nodes/reference.md +8 -1
- package/kit/files/.claude/skills/pix3-scene-format/SKILL.md +1 -1
- package/kit/files/.claude/skills/pix3-scene-format/reference.md +16 -1
- package/kit/files/.claude/skills/pix3-scripts/SKILL.md +1 -1
- package/kit/files/.claude/skills/pix3-scripts/reference.md +1 -1
- package/kit/files/.claude/skills/pix3-verify/SKILL.md +2 -2
- package/kit/files/.claude/skills/pix3-verify/reference.md +1 -1
- package/kit/files/AGENTS.md +1 -1
- package/kit/kit.json +2 -2
- package/package.json +1 -1
- package/dist/smoke/prebuilt/chunk-7WOFGLW3.mjs +0 -239
- package/dist/validate/prebuilt/chunk-HKG6YI6Y.js +0 -239
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __pix3CreateRequire } from 'node:module'; const require = __pix3CreateRequire(import.meta.url);
|
|
2
|
-
import{$,$a as $o,$b as $r,$c as $e,$d as om,$e as op,A,Aa as Bo,Ab as Ar,Ac as Ae,Ad as Bf,Ae as Bm,Af as Bp,B,Ba as Co,Bb as Br,Bc as Be,Bd as Cf,Be as Cm,Bf as Cp,C,Cb as Cr,Cc as Ce,Cd as Df,Ce as Dm,Cf as Dp,D,Da as Do,Db as Dr,Dc as De,Dd as Ef,De as Em,Df as Ep,E,Ea as Eo,Eb as Er,Ec as Ee,Ed as Ff,Ee as Fm,Ef as Fp,F,Fa as Fo,Fb as Fr,Fc as Fe,Fd as Gf,Fe as Gm,Ff as Gp,G,Ga as Go,Gb as Gr,Gc as Ge,Gd as Hf,Ge as Hm,Gf as Hp,H,Ha as Ho,Hb as Hr,Hc as He,Hd as If,He as Im,Hf as Ip,I,Ia as Io,Ib as Ir,Ic as Ie,Id as Jf,Ie as Jm,If as Jp,J,Ja as Jo,Jb as Jr,Jc as Je,Jd as Kf,Je as Km,Jf as Kp,K,Ka as Ko,Kb as Kr,Kc as Ke,Kd as Lf,Ke as Lm,Kf as Lp,L,La as Lo,Lb as Lr,Lc as Le,Ld as Mf,Le as Mm,Lf as Mp,M,Ma as Mo,Mb as Mr,Mc as Me,Md as Nf,Me as Nm,Mf as Np,N,Na as No,Nb as Nr,Nc as Ne,Nd as Of,Ne as Om,Nf as Op,O,Oa as Oo,Ob as Or,Oc as Oe,Od as Pf,Oe as Pm,Of as Pp,P,Pa as Po,Pb as Pr,Pc as Pe,Pd as Qf,Pe as Qm,Pf as Qp,Q,Qa as Qo,Qb as Qr,Qc as Qe,Qd as Rf,Qe as Rm,Qf as Rp,R,Ra as Ro,Rb as Rr,Rc as Re,Rd as Sf,Re as Sm,Rf as Sp,S,Sa as So,Sb as Sr,Sc as Se,Sd as Tf,Se as Tm,Sf as Tp,T,Ta as To,Tb as Tr,Tc as Te,Td as Uf,Te as Um,Tf as Up,U,Ua as Uo,Ub as Ur,Uc as Ue,Ud as Vf,Ue as Vm,V,Va as Vo,Vb as Vr,Vc as Ve,Vd as Wf,Ve as Wm,W,Wa as Wo,Wb as Wr,Wc as We,Wd as Xf,We as Xm,X,Xa as Xo,Xb as Xr,Xc as Xe,Xd as Yf,Xe as Ym,Y,Ya as Yo,Yb as Yr,Yc as Ye,Yd as Zf,Ye as Zm,Z,Za as Zo,Zb as Zr,Zc as Ze,Zd as _f,Ze as _m,_,_a as _o,_b as _r,_c as _e,_d as $f,_e as $m,a as o,aa as oo,ab as or,ac as oe,ad as of,ae as rm,af as rp,b as r,ba as ro,bb as rr,bc as re,bd as rf,be as em,bf as ep,c as e,ca as eo,cb as er,cc as ee,cd as ef,ce as fm,cf as fp,d as f,da as fo,db as fr,dc as fe,dd as ff,de as mm,df as mp,e as m,ea as mo,eb as mr,ec as me,ed as mf,ee as pm,ef as pp,f as p,fa as po,fb as pr,fc as pe,fd as pf,fe as tm,ff as tp,g as t,ga as to,gb as tr,gc as te,gd as tf,ge as xm,gf as xp,h as x,ha as xo,hb as xr,hc as xe,hd as xf,he as am,hf as ap,i as a,ia as ao,ib as ar,ic as ae,id as af,ie as bm,if as bp,j as b,ja as bo,jb as br,jc as be,jd as bf,je as cm,jf as cp,k as c,ka as co,kb as cr,kc as ce,kd as cf,ke as dm,kf as dp,l as d,la as go,lb as dr,lc as de,ld as df,le as gm,lf as gp,m as g,ma as ho,mb as gr,mc as ge,md as gf,me as hm,mf as hp,n as h,na as io,nb as hr,nc as he,nd as hf,ne as im,nf as ip,o as i,oa as jo,ob as ir,oc as ie,od as jf,oe as jm,of as jp,p as j,pa as ko,pb as jr,pc as je,pd as kf,pe as km,pf as kp,q as k,qa as lo,qb as kr,qc as ke,qd as lf,qe as lm,qf as lp,r as l,ra as no,rb as lr,rc as le,rd as nf,re as nm,rf as np,s as n,sa as qo,sb as nr,sc as ne,sd as qf,se as qm,sf as qp,t as q,ta as so,tb as qr,tc as qe,td as sf,te as sm,tf as sp,u as s,ua as uo,ub as sr,uc as se,ud as uf,ue as um,uf as up,v as u,va as vo,vb as ur,vc as ue,vd as vf,ve as vm,vf as vp,w as v,wa as wo,wb as vr,wc as ve,wd as wf,we as wm,wf as wp,x as w,xa as yo,xb as wr,xc as we,xd as yf,xe as ym,xf as yp,y,ya as zo,yb as yr,yc as ye,yd as zf,ye as zm,yf as zp,z,za as Ao,zb as zr,zc as ze,zd as Af,ze as Am,zf as Ap}from"./chunk-7WOFGLW3.mjs";import"./chunk-P2CBRXPJ.mjs";export{Ke as AO_MODES,up as ATLAS_MANIFEST_PATH,oo as ATLAS_REGION_KEY,vp as ATLAS_SHEET_DIR,$ as ATLAS_SHEET_SCHEME,ro as ATLAS_SIZE_KEY,ko as AUDIO_BUS_NAMES,Hr as AmbientLightNode,hr as AnimatedSprite2D,Qr as AnimatedSprite3D,rp as AnimationPlayerBehavior,jo as AssetLoader,Im as AudioApi,ve as AudioPlayer,lo as AudioService,fr as BATCHABLE_2D_KEY,Jo as BLEND_MODES_2D,Ko as BLEND_MODE_2D_OPTIONS,Vo as BUILTIN_SHADER_EFFECTS,wm as BURST_MAX_PARTICLES,ae as Bar2D,mr as Batch2DSystem,Gp as BurstOnSignalBehavior,te as Button2D,Ar as CAMERA2D_DEFAULTS,Op as CHARACTER_STATE_FINISHED_SIGNAL,Sf as CONTACT_MARGIN,Xe as CURRENT_SCENE_FORMAT_VERSION,Br as Camera2D,Ee as Camera3D,ep as CameraBrainBehavior,Dr as CanvasLayer2D,Pp as CharacterVisual2DBehavior,be as Checkbox2D,Lp as Collider2DBehavior,Rf as Collision2DService,kr as ColorRect2D,fp as CutsceneApi,Vm as DEFAULT_CLIP_DURATION,gp as DEFAULT_FIXED_DELTA_SEC,ye as DEFAULT_GEOMETRY_MATERIAL_TYPE,ip as DEFAULT_RUNTIME_TIME_CONFIG,k as DIRECTION_AXES_ENABLED_KEY,Er as DirectionalLightNode,Fe as EASING_NAMES,bp as ECSService,ff as EMOJI_GUARDED_TEXT_PROPERTIES,Cp as FadeBehavior,zm as FloatText2D,r as GAME_DEBUG_GLOBAL_KEY,ze as GEOMETRY_KINDS,we as GEOMETRY_MATERIAL_TYPES,sm as GameCommandRegistry,qm as GameTime,Ae as GeometryMesh,wr as Group2D,Or as HemisphereLightNode,Jp as Hitbox2DBehavior,ef as INSTANCE_TRANSFORM_KEYS,nf as InputService,Be as InstancedMesh3D,ce as InventorySlot2D,Wr as Joystick2D,Cm as JuiceApi,Ir as KNOWN_SCENE_NODE_TYPES,ie as LABEL_AUTO_SIZE_BLEED,je as LABEL_GLOW_STRENGTH_LIMIT,de as LABEL_H_ALIGN_VALUES,he as LABEL_LINE_HEIGHT_FACTOR,ge as LABEL_V_ALIGN_VALUES,ue as Label2D,mp as LocalizationService,Zf as MAX_NET_KIND,sf as MAX_POLYGON_VERTICES,hp as MAX_TICKS_PER_FRAME,Um as MIN_CLIP_DURATION,qf as MIN_POLYGON_VERTICES,L as MeshInstance,xm as NET_APP_FLAGS_SHIFT,tm as NET_OWNERSHIP_MASK,_f as NetKindTable,im as NetRoomVars,gm as NetworkConnectError,nm as NetworkNodeBinder,jm as NetworkService,dm as NetworkSpawnError,Qp as NetworkedNodeBehavior,Po as Node2D,G as Node3D,F as NodeBase,re as OVERLAY_2D_FLAG,h as PHYSICS_DEBUG_ENABLED_KEY,c as PHYSICS_DEBUG_GLOBAL_KEY,Oe as POST_PROCESS_DEFAULTS,Le as PROJECT_AO_MODES,xf as PROJECT_SCRIPT_DIRECTORIES,af as PROJECT_SCRIPT_ENTRY_PATTERN,S as PROJECT_TEXTURE_FILTERING_MODES,ym as ParticleBurst2D,Rr as Particles3D,Xf as Physics2DService,Kp as PhysicsBody2DBehavior,Mp as PhysicsWorld2DBehavior,Bp as PinToNodeBehavior,Ep as PlaySoundBehavior,Fr as PointLightNode,vm as PopInBehavior,Pe as PostProcess,xp as PostProcessingPipeline,um as PunchScaleBehavior,x as RUNTIME_PROPERTY_SINK_GLOBAL_KEY,m as RUNTIME_SCENE_GLOBAL_KEY,Dp as RadialProgressBehavior,Yf as RejectCode,Rp as ReplicatedTransformBehavior,o as ResourceManager,Np as RevoluteJoint2DBehavior,yp as RotateBehavior,sp as RuntimeRenderer,_e as SCENE_COMPONENT_DEFINITION_KEYS,$e as SCENE_DISK_FORMAT_TYPES,Ye as SCENE_DOCUMENT_KEYS,Ze as SCENE_NODE_DEFINITION_KEYS,u as SCRIPT_ERROR_SINK_GLOBAL_KEY,me as SEMANTIC_POINTER_ID,Em as SFX_PRESETS,E as SHARED_UNIT_QUAD_GEOMETRY,y as SIGNAL_EMIT_SINK_GLOBAL_KEY,Te as SceneLoader,lf as SceneManager,qp as SceneRunner,kf as SceneSaver,pp as SceneService,Se as SceneValidationError,qo as Script,no as ScriptRegistry,fe as ScrollContainer2D,Fp as SfxOnSignalBehavior,Hm as SfxSynth,or as ShaderEffectStack,yr as ShakeBehavior,zp as SimpleMoveBehavior,Ap as SineBehavior,xe as Slider2D,jr as SpineSkeleton2D,ir as SpineSkeletonView,Gr as SpotLightNode,ar as Sprite2D,Pr as Sprite3D,Ce as TARGET_DISTANCE,q as TEST_COMPONENT_TYPE_PREFIX,Am as TRAIL_MAX_POINTS,vr as TiledSprite2D,Bm as Trail2D,Dm as TweenApi,pe as UIControl2D,bf as USER_SCRIPT_ID_PREFIX,Ie as VIRTUAL_CAMERA_DEFAULTS,Je as VirtualCamera3D,mm as WS_CLOSE_NORMAL,fm as WS_CLOSE_PROTOCOL_VIOLATION,pm as WsTransport,nr as ZERO_SLICE_BORDER,Oo as Z_INDEX_LIMIT,De as aimCameraNodeAt,Qe as aoModeUsesSSAO,No as applyBlendMode2DToMaterial,Tm as applyClipAtTime,He as applyEasing,ap as applyLocaleToTree,$r as applyTextStyle,Y as applyTextureRegionToTexture,ee as assign2DRenderOrder,K as assignWithoutSchemaRefresh,fo as atlasSizeOf,Ao as attachComponentDefinitions,eo as baseRegionOf,Mo as blendingForMode2D,Ef as boxPolygon,ur as buildSkinGeometry,lr as buildTiledSpriteGeometry,Gf as capsulePolygon,Jf as circleIntersectsPolygon,Ff as circlePolygon,Gm as clampSfxPitch,Af as cleanPolygon,Ym as coerceKeyframeValue,er as coerceTextureResource,Ro as coerceToPropertyType,Mm as collectAudioKeysInRange,P as collectClipPointNames,Co as collectComponentDefinitions,Nm as collectEventKeysInRange,Ue as collectRenderabilityIssues,Lm as collectTimedKeysInRange,Uf as collideCirclePolygon,Tf as collideCircles,Vf as collidePolygons,Zo as composeEffectShaders,Z as composeTextureRegion,W as configure2DTexture,Bf as convexHull,Mf as convexPolygonsIntersect,po as copyAtlasMetadata,to as createAtlasResolver,Sm as createClipBindings,$m as createDefaultClip,_m as createEmptyAnimationSet,Zr as cssFont,Xr as cssFontFamily,Yr as cssFontWeight,lm as decodeSignalPayload,Of as decomposeConvex,So as defineGroup,Qo as defineProperty,uo as describeFontFace,hm as describeRejectCode,D as describeThrown,Nr as describeUnknownNodeType,If as distanceToPolygonBoundary,_r as drawStyledText,Uo as effectSupportsTarget,km as encodeSignalPayload,zf as ensureCounterClockwise,Cr as findActiveCamera2D,R as findAnimationClip,O as findAnimationFramePoint,tf as findEmojiArtInSceneYaml,op as findKeyframeClip,Om as fireEventKey,Qm as fromSchemaValue,Xm as generateTrackId,tr as getActiveLocalization,Yo as getAllShaderEffectTypes,M as getAnimationFrameTexturePath,zo as getComponentSchemaProperties,f as getGameDebug,$f as getNetKindTable,Do as getNodePropertySchema,g as getPhysicsDebugSource,Ne as getProjectAODefault,V as getProjectTextureFiltering,Eo as getPropertiesByGroup,Fo as getPropertyDefinition,Go as getPropertyDisplayValue,b as getRuntimeLivePropertySink,t as getRuntimeSceneRoot,of as getSceneNodeDiskFormat,w as getScriptErrorSink,Xo as getShaderEffectType,A as getSignalEmitSink,wp as installAtlasFromManifest,I as installReactiveSchemaProperties,Jm as interpolateValue,n as isDirectionAxesEnabled,mf as isEmojiOnlyText,wo as isFontFaceRegistered,Re as isHighEndDevice,We as isInertNode,Sr as isInteractive,Ge as isKeyframeEasing,Lr as isKnownSceneNodeType,cm as isNetTeleport,j as isPhysicsDebugEnabled,yf as isPolygonConvex,gf as isProjectScriptEntry,df as isProjectScriptPath,_ as isSameTextureRegion,so as isScriptComponent,hf as isScriptComponentClass,N as isSequenceAnimationFrame,Fm as isSfxPreset,$o as isShaderEffectHost,sr as isSliceBorderEmpty,ao as isSpineModuleAvailable,s as isTestHarnessComponentType,pf as isTextProperty,rr as isTextureResourceRef,Wm as isTrackValueType,ne as labelDecorationPadding,ke as labelGlowBlurPx,le as labelGlowPasses,qe as layoutLabelText,yo as loadProjectFonts,io as loadSpineAsset,bo as loadSpineModule,H as makeSchemaPropertyReactive,To as mergeSchemas,bm as netFlagsByte,am as netOwnershipOf,Q as normalizeAnimationResource,Lo as normalizeBlendMode2D,Zm as normalizeKeyframeAnimationSet,Jr as normalizeNodeTypeName,Hp as normalizePolygonConfig,T as normalizeProjectTextureFiltering,qr as normalizeSliceBorder,se as paintLabelCanvas,br as parseEventArgs,ho as parseSpineAtlasPageNames,np as playable,Hf as pointInPolygon,vf as polygonArea,Cf as polygonBounds,wf as polygonCentroid,uf as polygonSignedArea,Tp as property,Qf as quaternionToRotationZ,J as reactiveSchemaPropertyNames,Ur as readBooleanArg,Tr as readNumberArg,Vr as readStringArg,Pf as readWorldTransform2D,Lf as rectIntersectsConvexPolygon,Kf as rectIntersectsPolygon,Sp as registerBuiltInScripts,e as registerGameDebug,rm as registerNetworkPrefab,d as registerPhysicsDebugSource,jf as registerProjectScriptExports,a as registerRuntimeLivePropertySink,p as registerRuntimeSceneRoot,v as registerScriptErrorSink,Wo as registerShaderEffect,z as registerSignalEmitSink,C as reportScriptError,B as reportSignalEmit,em as resetNetKindTable,vo as resetProjectFontRegistry,cr as resolveAnimatedSpriteFrameLayout,dr as resolveFramePointToLocal,gr as resolveFramePolygonToLocal,xr as resolveLocalizedText,Bo as resolvePendingComponents,jp as resolveRuntimeTimeConfig,rf as resolveSceneDiskKey,Kr as resolveSceneNodeType,go as resolveSpinePagePath,Rm as resolveTrackTarget,Km as sampleTrack,X as sanitizeTextureRegion,Nf as segmentPolygonT,Ip as serializePolygonConfig,pr as setActiveLocalization,lp as setDefaultStoreUrl,l as setDirectionAxesEnabled,om as setNetworkPrefabTable,Io as setNodePropertyValue,i as setPhysicsDebugEnabled,kp as setPlayableAdapter,tp as setPostprocessingModuleLoader,Me as setProjectAODefault,U as setProjectTextureFiltering,xo as setSpineModuleLoader,_o as shaderEffectsCacheKey,zr as shakeNoise,co as spineAssetKey,mo as stampAtlasView,Up as state,oe as styledTextPadding,Mr as suggestSceneNodeType,Ve as summarizeRenderabilityIssues,Wf as sweepCircleAgainstPolygon,Pm as toSchemaValue,Df as transformPolygon,cf as userScriptComponentId,Ho as validatePropertyValue,cp as worldToCanvasLogical,dp as worldToCanvasThroughCamera};
|
|
2
|
+
import{$,$a as $o,$b as $r,$c as $e,$d as om,$e as op,A,Aa as Bo,Ab as Ar,Ac as Ae,Ad as Bf,Ae as Bm,Af as Bp,B,Ba as Co,Bb as Br,Bc as Be,Bd as Cf,Be as Cm,Bf as Cp,C,Cb as Cr,Cc as Ce,Cd as Df,Ce as Dm,Cf as Dp,D,Da as Do,Db as Dr,Dc as De,Dd as Ef,De as Em,Df as Ep,E,Ea as Eo,Eb as Er,Ec as Ee,Ed as Ff,Ee as Fm,Ef as Fp,F,Fa as Fo,Fb as Fr,Fc as Fe,Fd as Gf,Fe as Gm,Ff as Gp,G,Ga as Go,Gb as Gr,Gc as Ge,Gd as Hf,Ge as Hm,Gf as Hp,H,Ha as Ho,Hb as Hr,Hc as He,Hd as If,He as Im,Hf as Ip,I,Ia as Io,Ib as Ir,Ic as Ie,Id as Jf,Ie as Jm,If as Jp,J,Ja as Jo,Jb as Jr,Jc as Je,Jd as Kf,Je as Km,Jf as Kp,K,Ka as Ko,Kb as Kr,Kc as Ke,Kd as Lf,Ke as Lm,Kf as Lp,L,La as Lo,Lb as Lr,Lc as Le,Ld as Mf,Le as Mm,Lf as Mp,M,Ma as Mo,Mb as Mr,Mc as Me,Md as Nf,Me as Nm,Mf as Np,N,Na as No,Nb as Nr,Nc as Ne,Nd as Of,Ne as Om,Nf as Op,O,Oa as Oo,Ob as Or,Oc as Oe,Od as Pf,Oe as Pm,Of as Pp,P,Pa as Po,Pb as Pr,Pc as Pe,Pd as Qf,Pe as Qm,Pf as Qp,Q,Qa as Qo,Qb as Qr,Qc as Qe,Qd as Rf,Qe as Rm,Qf as Rp,R,Ra as Ro,Rb as Rr,Rc as Re,Rd as Sf,Re as Sm,Rf as Sp,S,Sa as So,Sb as Sr,Sc as Se,Sd as Tf,Se as Tm,Sf as Tp,T,Ta as To,Tb as Tr,Tc as Te,Td as Uf,Te as Um,Tf as Up,U,Ua as Uo,Ub as Ur,Uc as Ue,Ud as Vf,Ue as Vm,V,Va as Vo,Vb as Vr,Vc as Ve,Vd as Wf,Ve as Wm,W,Wa as Wo,Wb as Wr,Wc as We,Wd as Xf,We as Xm,X,Xa as Xo,Xb as Xr,Xc as Xe,Xd as Yf,Xe as Ym,Y,Ya as Yo,Yb as Yr,Yc as Ye,Yd as Zf,Ye as Zm,Z,Za as Zo,Zb as Zr,Zc as Ze,Zd as _f,Ze as _m,_,_a as _o,_b as _r,_c as _e,_d as $f,_e as $m,a as o,aa as oo,ab as or,ac as oe,ad as of,ae as rm,af as rp,b as r,ba as ro,bb as rr,bc as re,bd as rf,be as em,bf as ep,c as e,ca as eo,cb as er,cc as ee,cd as ef,ce as fm,cf as fp,d as f,da as fo,db as fr,dc as fe,dd as ff,de as mm,df as mp,e as m,ea as mo,eb as mr,ec as me,ed as mf,ee as pm,ef as pp,f as p,fa as po,fb as pr,fc as pe,fd as pf,fe as tm,ff as tp,g as t,ga as to,gb as tr,gc as te,gd as tf,ge as xm,gf as xp,h as x,ha as xo,hb as xr,hc as xe,hd as xf,he as am,hf as ap,i as a,ia as ao,ib as ar,ic as ae,id as af,ie as bm,if as bp,j as b,ja as bo,jb as br,jc as be,jd as bf,je as cm,jf as cp,k as c,ka as co,kb as cr,kc as ce,kd as cf,ke as dm,kf as dp,l as d,la as go,lb as dr,lc as de,ld as df,le as gm,lf as gp,m as g,ma as ho,mb as gr,mc as ge,md as gf,me as hm,mf as hp,n as h,na as io,nb as hr,nc as he,nd as hf,ne as im,nf as ip,o as i,oa as jo,ob as ir,oc as ie,od as jf,oe as jm,of as jp,p as j,pa as ko,pb as jr,pc as je,pd as kf,pe as km,pf as kp,q as k,qa as lo,qb as kr,qc as ke,qd as lf,qe as lm,qf as lp,r as l,ra as no,rb as lr,rc as le,rd as nf,re as nm,rf as np,s as n,sa as qo,sb as nr,sc as ne,sd as qf,se as qm,sf as qp,t as q,ta as so,tb as qr,tc as qe,td as sf,te as sm,tf as sp,u as s,ua as uo,ub as sr,uc as se,ud as uf,ue as um,uf as up,v as u,va as vo,vb as ur,vc as ue,vd as vf,ve as vm,vf as vp,w as v,wa as wo,wb as vr,wc as ve,wd as wf,we as wm,wf as wp,x as w,xa as yo,xb as wr,xc as we,xd as yf,xe as ym,xf as yp,y,ya as zo,yb as yr,yc as ye,yd as zf,ye as zm,yf as zp,z,za as Ao,zb as zr,zc as ze,zd as Af,ze as Am,zf as Ap}from"./chunk-VJHJ5BCO.mjs";import"./chunk-P2CBRXPJ.mjs";export{Ke as AO_MODES,up as ATLAS_MANIFEST_PATH,oo as ATLAS_REGION_KEY,vp as ATLAS_SHEET_DIR,$ as ATLAS_SHEET_SCHEME,ro as ATLAS_SIZE_KEY,ko as AUDIO_BUS_NAMES,Hr as AmbientLightNode,hr as AnimatedSprite2D,Qr as AnimatedSprite3D,rp as AnimationPlayerBehavior,jo as AssetLoader,Im as AudioApi,ve as AudioPlayer,lo as AudioService,fr as BATCHABLE_2D_KEY,Jo as BLEND_MODES_2D,Ko as BLEND_MODE_2D_OPTIONS,Vo as BUILTIN_SHADER_EFFECTS,wm as BURST_MAX_PARTICLES,ae as Bar2D,mr as Batch2DSystem,Gp as BurstOnSignalBehavior,te as Button2D,Ar as CAMERA2D_DEFAULTS,Op as CHARACTER_STATE_FINISHED_SIGNAL,Sf as CONTACT_MARGIN,Xe as CURRENT_SCENE_FORMAT_VERSION,Br as Camera2D,Ee as Camera3D,ep as CameraBrainBehavior,Dr as CanvasLayer2D,Pp as CharacterVisual2DBehavior,be as Checkbox2D,Lp as Collider2DBehavior,Rf as Collision2DService,kr as ColorRect2D,fp as CutsceneApi,Vm as DEFAULT_CLIP_DURATION,gp as DEFAULT_FIXED_DELTA_SEC,ye as DEFAULT_GEOMETRY_MATERIAL_TYPE,ip as DEFAULT_RUNTIME_TIME_CONFIG,k as DIRECTION_AXES_ENABLED_KEY,Er as DirectionalLightNode,Fe as EASING_NAMES,bp as ECSService,ff as EMOJI_GUARDED_TEXT_PROPERTIES,Cp as FadeBehavior,zm as FloatText2D,r as GAME_DEBUG_GLOBAL_KEY,ze as GEOMETRY_KINDS,we as GEOMETRY_MATERIAL_TYPES,sm as GameCommandRegistry,qm as GameTime,Ae as GeometryMesh,wr as Group2D,Or as HemisphereLightNode,Jp as Hitbox2DBehavior,ef as INSTANCE_TRANSFORM_KEYS,nf as InputService,Be as InstancedMesh3D,ce as InventorySlot2D,Wr as Joystick2D,Cm as JuiceApi,Ir as KNOWN_SCENE_NODE_TYPES,ie as LABEL_AUTO_SIZE_BLEED,je as LABEL_GLOW_STRENGTH_LIMIT,de as LABEL_H_ALIGN_VALUES,he as LABEL_LINE_HEIGHT_FACTOR,ge as LABEL_V_ALIGN_VALUES,ue as Label2D,mp as LocalizationService,Zf as MAX_NET_KIND,sf as MAX_POLYGON_VERTICES,hp as MAX_TICKS_PER_FRAME,Um as MIN_CLIP_DURATION,qf as MIN_POLYGON_VERTICES,L as MeshInstance,xm as NET_APP_FLAGS_SHIFT,tm as NET_OWNERSHIP_MASK,_f as NetKindTable,im as NetRoomVars,gm as NetworkConnectError,nm as NetworkNodeBinder,jm as NetworkService,dm as NetworkSpawnError,Qp as NetworkedNodeBehavior,Po as Node2D,G as Node3D,F as NodeBase,re as OVERLAY_2D_FLAG,h as PHYSICS_DEBUG_ENABLED_KEY,c as PHYSICS_DEBUG_GLOBAL_KEY,Oe as POST_PROCESS_DEFAULTS,Le as PROJECT_AO_MODES,xf as PROJECT_SCRIPT_DIRECTORIES,af as PROJECT_SCRIPT_ENTRY_PATTERN,S as PROJECT_TEXTURE_FILTERING_MODES,ym as ParticleBurst2D,Rr as Particles3D,Xf as Physics2DService,Kp as PhysicsBody2DBehavior,Mp as PhysicsWorld2DBehavior,Bp as PinToNodeBehavior,Ep as PlaySoundBehavior,Fr as PointLightNode,vm as PopInBehavior,Pe as PostProcess,xp as PostProcessingPipeline,um as PunchScaleBehavior,x as RUNTIME_PROPERTY_SINK_GLOBAL_KEY,m as RUNTIME_SCENE_GLOBAL_KEY,Dp as RadialProgressBehavior,Yf as RejectCode,Rp as ReplicatedTransformBehavior,o as ResourceManager,Np as RevoluteJoint2DBehavior,yp as RotateBehavior,sp as RuntimeRenderer,_e as SCENE_COMPONENT_DEFINITION_KEYS,$e as SCENE_DISK_FORMAT_TYPES,Ye as SCENE_DOCUMENT_KEYS,Ze as SCENE_NODE_DEFINITION_KEYS,u as SCRIPT_ERROR_SINK_GLOBAL_KEY,me as SEMANTIC_POINTER_ID,Em as SFX_PRESETS,E as SHARED_UNIT_QUAD_GEOMETRY,y as SIGNAL_EMIT_SINK_GLOBAL_KEY,Te as SceneLoader,lf as SceneManager,qp as SceneRunner,kf as SceneSaver,pp as SceneService,Se as SceneValidationError,qo as Script,no as ScriptRegistry,fe as ScrollContainer2D,Fp as SfxOnSignalBehavior,Hm as SfxSynth,or as ShaderEffectStack,yr as ShakeBehavior,zp as SimpleMoveBehavior,Ap as SineBehavior,xe as Slider2D,jr as SpineSkeleton2D,ir as SpineSkeletonView,Gr as SpotLightNode,ar as Sprite2D,Pr as Sprite3D,Ce as TARGET_DISTANCE,q as TEST_COMPONENT_TYPE_PREFIX,Am as TRAIL_MAX_POINTS,vr as TiledSprite2D,Bm as Trail2D,Dm as TweenApi,pe as UIControl2D,bf as USER_SCRIPT_ID_PREFIX,Ie as VIRTUAL_CAMERA_DEFAULTS,Je as VirtualCamera3D,mm as WS_CLOSE_NORMAL,fm as WS_CLOSE_PROTOCOL_VIOLATION,pm as WsTransport,nr as ZERO_SLICE_BORDER,Oo as Z_INDEX_LIMIT,De as aimCameraNodeAt,Qe as aoModeUsesSSAO,No as applyBlendMode2DToMaterial,Tm as applyClipAtTime,He as applyEasing,ap as applyLocaleToTree,$r as applyTextStyle,Y as applyTextureRegionToTexture,ee as assign2DRenderOrder,K as assignWithoutSchemaRefresh,fo as atlasSizeOf,Ao as attachComponentDefinitions,eo as baseRegionOf,Mo as blendingForMode2D,Ef as boxPolygon,ur as buildSkinGeometry,lr as buildTiledSpriteGeometry,Gf as capsulePolygon,Jf as circleIntersectsPolygon,Ff as circlePolygon,Gm as clampSfxPitch,Af as cleanPolygon,Ym as coerceKeyframeValue,er as coerceTextureResource,Ro as coerceToPropertyType,Mm as collectAudioKeysInRange,P as collectClipPointNames,Co as collectComponentDefinitions,Nm as collectEventKeysInRange,Ue as collectRenderabilityIssues,Lm as collectTimedKeysInRange,Uf as collideCirclePolygon,Tf as collideCircles,Vf as collidePolygons,Zo as composeEffectShaders,Z as composeTextureRegion,W as configure2DTexture,Bf as convexHull,Mf as convexPolygonsIntersect,po as copyAtlasMetadata,to as createAtlasResolver,Sm as createClipBindings,$m as createDefaultClip,_m as createEmptyAnimationSet,Zr as cssFont,Xr as cssFontFamily,Yr as cssFontWeight,lm as decodeSignalPayload,Of as decomposeConvex,So as defineGroup,Qo as defineProperty,uo as describeFontFace,hm as describeRejectCode,D as describeThrown,Nr as describeUnknownNodeType,If as distanceToPolygonBoundary,_r as drawStyledText,Uo as effectSupportsTarget,km as encodeSignalPayload,zf as ensureCounterClockwise,Cr as findActiveCamera2D,R as findAnimationClip,O as findAnimationFramePoint,tf as findEmojiArtInSceneYaml,op as findKeyframeClip,Om as fireEventKey,Qm as fromSchemaValue,Xm as generateTrackId,tr as getActiveLocalization,Yo as getAllShaderEffectTypes,M as getAnimationFrameTexturePath,zo as getComponentSchemaProperties,f as getGameDebug,$f as getNetKindTable,Do as getNodePropertySchema,g as getPhysicsDebugSource,Ne as getProjectAODefault,V as getProjectTextureFiltering,Eo as getPropertiesByGroup,Fo as getPropertyDefinition,Go as getPropertyDisplayValue,b as getRuntimeLivePropertySink,t as getRuntimeSceneRoot,of as getSceneNodeDiskFormat,w as getScriptErrorSink,Xo as getShaderEffectType,A as getSignalEmitSink,wp as installAtlasFromManifest,I as installReactiveSchemaProperties,Jm as interpolateValue,n as isDirectionAxesEnabled,mf as isEmojiOnlyText,wo as isFontFaceRegistered,Re as isHighEndDevice,We as isInertNode,Sr as isInteractive,Ge as isKeyframeEasing,Lr as isKnownSceneNodeType,cm as isNetTeleport,j as isPhysicsDebugEnabled,yf as isPolygonConvex,gf as isProjectScriptEntry,df as isProjectScriptPath,_ as isSameTextureRegion,so as isScriptComponent,hf as isScriptComponentClass,N as isSequenceAnimationFrame,Fm as isSfxPreset,$o as isShaderEffectHost,sr as isSliceBorderEmpty,ao as isSpineModuleAvailable,s as isTestHarnessComponentType,pf as isTextProperty,rr as isTextureResourceRef,Wm as isTrackValueType,ne as labelDecorationPadding,ke as labelGlowBlurPx,le as labelGlowPasses,qe as layoutLabelText,yo as loadProjectFonts,io as loadSpineAsset,bo as loadSpineModule,H as makeSchemaPropertyReactive,To as mergeSchemas,bm as netFlagsByte,am as netOwnershipOf,Q as normalizeAnimationResource,Lo as normalizeBlendMode2D,Zm as normalizeKeyframeAnimationSet,Jr as normalizeNodeTypeName,Hp as normalizePolygonConfig,T as normalizeProjectTextureFiltering,qr as normalizeSliceBorder,se as paintLabelCanvas,br as parseEventArgs,ho as parseSpineAtlasPageNames,np as playable,Hf as pointInPolygon,vf as polygonArea,Cf as polygonBounds,wf as polygonCentroid,uf as polygonSignedArea,Tp as property,Qf as quaternionToRotationZ,J as reactiveSchemaPropertyNames,Ur as readBooleanArg,Tr as readNumberArg,Vr as readStringArg,Pf as readWorldTransform2D,Lf as rectIntersectsConvexPolygon,Kf as rectIntersectsPolygon,Sp as registerBuiltInScripts,e as registerGameDebug,rm as registerNetworkPrefab,d as registerPhysicsDebugSource,jf as registerProjectScriptExports,a as registerRuntimeLivePropertySink,p as registerRuntimeSceneRoot,v as registerScriptErrorSink,Wo as registerShaderEffect,z as registerSignalEmitSink,C as reportScriptError,B as reportSignalEmit,em as resetNetKindTable,vo as resetProjectFontRegistry,cr as resolveAnimatedSpriteFrameLayout,dr as resolveFramePointToLocal,gr as resolveFramePolygonToLocal,xr as resolveLocalizedText,Bo as resolvePendingComponents,jp as resolveRuntimeTimeConfig,rf as resolveSceneDiskKey,Kr as resolveSceneNodeType,go as resolveSpinePagePath,Rm as resolveTrackTarget,Km as sampleTrack,X as sanitizeTextureRegion,Nf as segmentPolygonT,Ip as serializePolygonConfig,pr as setActiveLocalization,lp as setDefaultStoreUrl,l as setDirectionAxesEnabled,om as setNetworkPrefabTable,Io as setNodePropertyValue,i as setPhysicsDebugEnabled,kp as setPlayableAdapter,tp as setPostprocessingModuleLoader,Me as setProjectAODefault,U as setProjectTextureFiltering,xo as setSpineModuleLoader,_o as shaderEffectsCacheKey,zr as shakeNoise,co as spineAssetKey,mo as stampAtlasView,Up as state,oe as styledTextPadding,Mr as suggestSceneNodeType,Ve as summarizeRenderabilityIssues,Wf as sweepCircleAgainstPolygon,Pm as toSchemaValue,Df as transformPolygon,cf as userScriptComponentId,Ho as validatePropertyValue,cp as worldToCanvasLogical,dp as worldToCanvasThroughCamera};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { createRequire as __pix3CreateRequire } from 'node:module'; const require = __pix3CreateRequire(import.meta.url);
|
|
2
|
-
import{a as ge,c as fe,d as he,e as Se,f as Ee}from"./chunk-
|
|
2
|
+
import{a as ge,c as fe,d as he,e as Se,f as Ee}from"./chunk-CBFYKDS7.mjs";import{Ca as oe,D as T,F as te,Rf as pe,Sc as se,Tc as ie,d as Q,ff as ue,jd as ae,md as ce,od as le,qa as ne,qd as de,ra as re,sf as me,w as ee}from"./chunk-VJHJ5BCO.mjs";import{d as Z}from"./chunk-P2CBRXPJ.mjs";import{parentPort as mt,workerData as pt}from"node:worker_threads";var $e=Z(oe(),1);import{readdirSync as Ae,readFileSync as De}from"node:fs";import{isAbsolute as je,join as B,relative as be,resolve as ye,sep as we}from"node:path";var $=Z(oe(),1);var F=t=>typeof t=="object"&&t!==null&&!Array.isArray(t);var Fe=new Set(["node_modules",".yalc",".git",".pix3","dist",".vite",".cache"]),We=".pix3scene",H=class{root;files;fileSet;textCache=new Map;constructor(e){this.root=ye(e),this.files=ve(this.root,this.root).sort(),this.fileSet=new Set(this.files)}has(e){return this.fileSet.has(e)}absolute(e){return B(this.root,e)}relativeOf(e){let i=be(this.root,ye(e));return i.startsWith("..")||je(i)?null:i.split(we).join("/")}readText(e){let i=this.textCache.get(e);if(i!==void 0)return i;let o=De(this.absolute(e),"utf8");return this.textCache.set(e,o),o}scenes(){return this.files.filter(e=>e.endsWith(We))}},ve=(t,e)=>{let i=[],o;try{o=Ae(e,{withFileTypes:!0})}catch{return i}for(let a of o)if(a.isDirectory()){if(Fe.has(a.name))continue;i.push(...ve(t,B(e,a.name)))}else a.isFile()&&i.push(be(t,B(e,a.name)).split(we).join("/"));return i};var He=t=>t.replace(/\/\*[\s\S]*?\*\//g," ").replace(/(^|[^:\\])\/\/.*$/gm,"$1"),Ue=/\bexport\s+(default\s+)?(?:abstract\s+)?class\s+([A-Za-z_$][\w$]*)?/g,Ke=/\bexport\s+(?:const|let|var)\s+([A-Za-z_$][\w$]*)\s*=\s*class\b/g,Be=/\bexport\s+(type\s+)?\{([^}]*)\}/g,Ge=/\bexport\s+\*\s+(?:as\s+[A-Za-z_$][\w$]*\s+)?from\b/,Je=t=>{let e=He(t),i=[];for(let o of e.matchAll(Ue))i.push(o[1]?"default":o[2]??"default");for(let o of e.matchAll(Ke))i.push(o[1]);for(let o of e.matchAll(Be))if(!o[1])for(let a of o[2].split(",")){let s=a.trim();if(!s||s.startsWith("type "))continue;let r=/\bas\s+([A-Za-z_$][\w$]*)$/.exec(s);i.push(r?r[1]:s.split(/\s+/)[0])}return{names:i,hasStar:Ge.test(e)}},Re=t=>{let e=new Map,i=[],o=[];for(let a of t.files){if(!(a.endsWith(".ts")||a.endsWith(".js"))||a.endsWith(".d.ts"))continue;let s;try{s=t.readText(a)}catch{continue}if(!ce(a,s))continue;i.push(a);let{names:r,hasStar:d}=Je(s);d&&o.push(a);for(let m of r){let f=`${ae}${m}`;e.has(f)||e.set(f,a)}}return{ids:e,entries:i,opaqueEntries:o}};import{existsSync as qe,mkdtempSync as ze,rmSync as Ve,writeFileSync as Xe}from"node:fs";import{tmpdir as Ye}from"node:os";import{join as G}from"node:path";import{pathToFileURL as Ze}from"node:url";var ke=t=>{let e=t.split("/");return t.startsWith("@")?e.slice(0,2).join("/"):e[0]},Qe=(t,e,i,o,a)=>({name:"pix3-smoke-imports",setup(s){s.onResolve({filter:/^@pix3\/runtime$/},()=>({path:t.runtime,external:!0})),s.onResolve({filter:/^three$/},()=>({path:t.three,external:!0})),s.onResolve({filter:/\?(raw|url)$/},r=>{let[d,m]=r.path.split("?");return{path:G(r.resolveDir,d),namespace:m==="raw"?"pix3-raw":"pix3-url"}}),s.onResolve({filter:/^[^./]/},async r=>{if(r.kind==="entry-point"||r.pluginData==="pix3-smoke")return;if(r.path.startsWith("node:")||r.path.startsWith("virtual:"))return i.add(r.path),{path:r.path,namespace:"pix3-stub"};let d=async f=>s.resolve(r.path,{kind:r.kind,resolveDir:f,pluginData:"pix3-smoke"}),m=await d(r.resolveDir);return m.errors.length>0&&a&&ke(r.path)==="three"&&(m=await d(a)),m.errors.length>0||!m.path?(i.add(r.path),{path:r.path,namespace:"pix3-stub"}):(o.add(ke(r.path)),{path:m.path,external:m.external})}),s.onLoad({filter:/.*/,namespace:"pix3-stub"},()=>({contents:"module.exports = {};",loader:"js"})),s.onLoad({filter:/.*/,namespace:"pix3-raw"},async r=>{let{readFile:d}=await import("node:fs/promises");return{contents:`export default ${JSON.stringify(await d(r.path,"utf8"))};`,loader:"js"}}),s.onLoad({filter:/.*/,namespace:"pix3-url"},r=>({contents:`export default ${JSON.stringify(`res://${e.relativeOf(r.path)??r.path}`)};`,loader:"js"}))}}),xe=async(t,e,i,o,a={})=>{let s=a.esbuildSpecifier??"esbuild";if(e.length===0)return{status:"none"};let r;try{r=await import(s)}catch{return{status:"unavailable",reason:"esbuild is not installed (it is an optional dependency of @pix3/cli), so the project scripts cannot be compiled"}}let d=new Set,m=new Set,f;try{f=(await r.build({stdin:{contents:e.map((n,g)=>`export * as __pix3_entry_${g} from ${JSON.stringify(`./${n}`)};`).join(`
|
|
3
3
|
`),resolveDir:t.root,sourcefile:"pix3-smoke-scripts.ts",loader:"ts"},bundle:!0,write:!1,format:"esm",platform:"browser",target:"es2022",logLevel:"silent",sourcemap:"inline",sourceRoot:`${t.root.replace(/[\\/]+$/,"")}/`,loader:{".glsl":"text",".vert":"text",".frag":"text",".css":"empty",".wasm":"binary"},define:{"import.meta.env.BASE_URL":JSON.stringify("/"),"import.meta.env.DEV":"true","import.meta.env.PROD":"false","import.meta.env.MODE":JSON.stringify("development")},plugins:[Qe(o,t,d,m,a.fallbackResolveDir)]})).outputFiles[0]?.text??""}catch(b){let n=b.errors??[];return{status:"compile-failed",failures:(n.length>0?n:[{text:String(b),location:null}]).map(g=>({message:g.text,file:g.location?.file,line:g.location?.line}))}}let k=ze(G(Ye(),"pix3-smoke-scripts-")),L=G(k,"scripts.mjs");try{Xe(L,f);let b=await import(Ze(L).href),n=[];return e.forEach((g,x)=>{let _=b[`__pix3_entry_${x}`];F(_)&&n.push(...le(i,_,g))}),{status:"loaded",registered:n,stubbed:[...d].sort(),bundledPackages:[...m].sort()}}catch(b){return{status:"import-failed",error:b,stubbed:[...d].sort()}}finally{qe(k)&&Ve(k,{recursive:!0,force:!0})}};var et=new Set(["window.AudioContext","window.webkitAudioContext","window.__PIX3_DEBUG__","window.ontouchstart","window.PointerEvent","window.visualViewport","window.chrome","<canvas>.depth"]),tt=new Set(["then","toJSON","constructor","nodeType","asymmetricMatch","$$typeof","inspect","valueOf","toString"]),J=(t,e,i,o)=>new Proxy(t,{get(a,s,r){if(Reflect.has(a,s))return Reflect.get(a,s,r);if(o&&Reflect.has(o,s))return Reflect.get(o,s);if(typeof s=="symbol"||tt.has(s))return;let d=`${e}.${s}`;et.has(d)||(i.seen.has(d)||(i.seen.add(d),i.missing.push(d)),i.recent.push(d))},set(a,s,r){return Reflect.set(a,s,r),o&&typeof s=="string"&&Reflect.set(o,s,r),!0}}),U=class{data=new Map;get length(){return this.data.size}key(e){return[...this.data.keys()][e]??null}getItem(e){return this.data.get(String(e))??null}setItem(e,i){this.data.set(String(e),String(i))}removeItem(e){this.data.delete(String(e))}clear(){this.data.clear()}},Pe=(t,e)=>({x:0,y:0,left:0,top:0,right:t,bottom:e,width:t,height:e,toJSON:()=>({})}),nt=(t,e)=>o=>{let a=new EventTarget,s=[],r=o==="canvas",d=new Set,m=new Map,f=null,k=n=>(n&&typeof n=="object"&&(Reflect.set(n,"parentElement",f),Reflect.set(n,"parentNode",f)),n),L=n=>(n&&typeof n=="object"&&Reflect.get(n,"parentElement")===f&&(Reflect.set(n,"parentElement",null),Reflect.set(n,"parentNode",null)),n),b={tagName:o.toUpperCase(),nodeName:o.toUpperCase(),style:{},dataset:{},children:s,childNodes:s,parentElement:null,parentNode:null,textContent:"",innerHTML:"",width:r?e.width:0,height:r?e.height:0,clientWidth:r?e.width:0,clientHeight:r?e.height:0,offsetWidth:r?e.width:0,offsetHeight:r?e.height:0,classList:{add:(...n)=>n.forEach(g=>d.add(g)),remove:(...n)=>n.forEach(g=>d.delete(g)),toggle:(n,g)=>{let x=g??!d.has(n);return x?d.add(n):d.delete(n),x},contains:n=>d.has(n)},addEventListener:a.addEventListener.bind(a),removeEventListener:a.removeEventListener.bind(a),dispatchEvent:a.dispatchEvent.bind(a),getBoundingClientRect:()=>r?Pe(e.width,e.height):Pe(0,0),getContext:n=>r&&n==="2d"?ge():null,appendChild:n=>(s.push(n),k(n)),removeChild:n=>{let g=s.indexOf(n);return g>=0&&s.splice(g,1),L(n)},insertBefore:n=>(s.push(n),k(n)),append:(...n)=>{s.push(...n.map(k))},prepend:(...n)=>{s.unshift(...n.map(k))},remove:()=>{let n=b.parentElement,g=n&&typeof n=="object"?Reflect.get(n,"removeChild"):void 0;typeof g=="function"&&g(f??{})},contains:n=>n===f||s.includes(n),setAttribute:(n,g)=>{m.set(n,String(g))},getAttribute:n=>m.get(n)??null,removeAttribute:n=>{m.delete(n)},hasAttribute:n=>m.has(n),querySelector:()=>null,querySelectorAll:()=>[],focus:()=>{},blur:()=>{},click:()=>{},setPointerCapture:()=>{},releasePointerCapture:()=>{},hasPointerCapture:()=>!1,requestPointerLock:()=>{},animate:()=>({cancel:()=>{},finished:Promise.resolve()})};return f=J(b,`<${o}>`,t),f},rt=t=>{let e=new EventTarget,i="",o={tagName:"IMG",style:{},crossOrigin:null,complete:!1,width:0,height:0,naturalWidth:0,naturalHeight:0,onload:null,onerror:null,addEventListener:e.addEventListener.bind(e),removeEventListener:e.removeEventListener.bind(e),dispatchEvent:e.dispatchEvent.bind(e),decode:()=>Promise.resolve()};return Object.defineProperty(o,"src",{get:()=>i,set:a=>{i=String(a),setTimeout(()=>{Object.assign(o,{complete:!0,width:1,height:1,naturalWidth:1,naturalHeight:1}),t(),e.dispatchEvent(new Event("load"));let s=o.onload;typeof s=="function"&&s.call(o,new Event("load"))},0)}}),o},N=(t,e)=>{let i=class{};return Object.defineProperty(i,"name",{value:t}),Object.defineProperty(i,Symbol.hasInstance,{value:o=>{if(o===null||typeof o!="object")return!1;let a=Reflect.get(o,"tagName");return typeof a=="string"&&(e===null||e.includes(a))}}),i},I=t=>{let e=class extends Event{constructor(i,o={}){super(i,o),Object.assign(this,o)}};return Object.defineProperty(e,"name",{value:t}),e},Oe={Node:()=>N("Node",null),Element:()=>N("Element",null),HTMLElement:()=>N("HTMLElement",null),HTMLCanvasElement:()=>N("HTMLCanvasElement",["CANVAS"]),HTMLDivElement:()=>N("HTMLDivElement",["DIV"]),HTMLImageElement:()=>N("HTMLImageElement",["IMG"]),HTMLVideoElement:()=>N("HTMLVideoElement",["VIDEO"]),PointerEvent:()=>I("PointerEvent"),MouseEvent:()=>I("MouseEvent"),KeyboardEvent:()=>I("KeyboardEvent"),TouchEvent:()=>I("TouchEvent"),WheelEvent:()=>I("WheelEvent"),FocusEvent:()=>I("FocusEvent")},ot=[...Object.keys(Oe),"Image","window","self","document","localStorage","sessionStorage","requestAnimationFrame","cancelAnimationFrame","matchMedia","getComputedStyle","innerWidth","innerHeight","devicePixelRatio"],Me=t=>{let e={missing:[],seen:new Set,recent:[]},i=0,o=()=>rt(()=>{i+=1}),a=nt(e,t),s=new EventTarget,r=new EventTarget,d=a("body"),m=a("head"),f=a("html"),k={body:d,head:m,documentElement:f,visibilityState:"visible",hidden:!1,readyState:"complete",fonts:{add:()=>{},delete:()=>{},load:()=>Promise.resolve([]),ready:Promise.resolve(),check:()=>!0},hasFocus:()=>!0,createElement:u=>{let h=String(u).toLowerCase();return h==="img"?o():a(h)},createElementNS:(u,h)=>h==="img"?o():a(String(h).toLowerCase()),createTextNode:u=>({textContent:u}),getElementById:()=>null,getElementsByClassName:()=>[],getElementsByTagName:()=>[],querySelector:()=>null,querySelectorAll:()=>[],addEventListener:r.addEventListener.bind(r),removeEventListener:r.removeEventListener.bind(r),dispatchEvent:r.dispatchEvent.bind(r)},L=J(k,"document",e),b=0,n=new Map,g=u=>{let h=++b;return n.set(h,setTimeout(()=>{n.delete(h),u(performance.now())},16)),h},x=u=>{let h=n.get(u);h!==void 0&&clearTimeout(h),n.delete(u)},_=u=>({matches:!1,media:u,onchange:null,addEventListener:()=>{},removeEventListener:()=>{},addListener:()=>{},removeListener:()=>{}}),P={document:L,innerWidth:t.width,innerHeight:t.height,outerWidth:t.width,outerHeight:t.height,devicePixelRatio:1,screen:{width:t.width,height:t.height,orientation:{type:"portrait-primary",angle:0}},location:{href:"http://localhost/",origin:"http://localhost",protocol:"http:",host:"localhost",hostname:"localhost",port:"",pathname:"/",search:"",hash:"",reload:()=>{},assign:()=>{},replace:()=>{}},history:{pushState:()=>{},replaceState:()=>{},back:()=>{}},localStorage:new U,sessionStorage:new U,requestAnimationFrame:g,cancelAnimationFrame:x,matchMedia:_,getComputedStyle:()=>({getPropertyValue:()=>""}),addEventListener:s.addEventListener.bind(s),removeEventListener:s.removeEventListener.bind(s),dispatchEvent:s.dispatchEvent.bind(s),focus:()=>{},blur:()=>{},open:()=>null,alert:()=>{},confirm:()=>!1,prompt:()=>null,scrollTo:()=>{}},v=J(P,"window",e,globalThis);P.window=v,P.self=v,P.top=v,P.parent=v;let O=new Map,E=(u,h)=>{O.set(u,Object.getOwnPropertyDescriptor(globalThis,u)),Object.defineProperty(globalThis,u,{value:h,configurable:!0,writable:!0})};E("window",v),E("self",v),E("document",L),E("localStorage",P.localStorage),E("sessionStorage",P.sessionStorage),E("requestAnimationFrame",g),E("cancelAnimationFrame",x),E("matchMedia",_),E("getComputedStyle",P.getComputedStyle),E("innerWidth",t.width),E("innerHeight",t.height),E("devicePixelRatio",1);for(let[u,h]of Object.entries(Oe))typeof Reflect.get(globalThis,u)>"u"&&E(u,h());return E("Image",function(){return o()}),{get imagesLoaded(){return i},get missing(){return e.missing},takeRecentMissing(){let u=[...new Set(e.recent)];return e.recent=[],u},uninstall(){for(let u of n.values())clearTimeout(u);n.clear();for(let u of ot){if(!O.has(u))continue;let h=O.get(u);h?Object.defineProperty(globalThis,u,h):Reflect.deleteProperty(globalThis,u)}}}};var st=Number.MAX_SAFE_INTEGER,it=128,at=(t,e)=>({domElement:t,beginStatsFrame:()=>{},render:()=>{},setAutoClear:()=>{},clear:()=>{},clearDepth:()=>{},getStatsSnapshot:()=>({calls:0,triangles:0,points:0,lines:0,geometries:0,textures:0,programs:0}),getWebGLRenderer:()=>(e(),{getSize:()=>({x:1,y:1}),getPixelRatio:()=>1})}),Le=async(t=1)=>{for(let e=0;e<t;e+=1){for(let i=0;i<4;i+=1)await Promise.resolve();await new Promise(i=>setTimeout(i,0))}},_e=t=>{let e=0,i=o=>{e+=1;for(let a of o.children)a instanceof te&&i(a)};return t.forEach(i),e},q=t=>{if(t instanceof Error)return`${t.name}: ${t.message}`;if(typeof t=="string")return t;try{return JSON.stringify(t)??String(t)}catch{return String(t)}},ct=/\b(window|document|navigator|localStorage|sessionStorage|requestAnimationFrame|customElements|getComputedStyle|matchMedia|ResizeObserver|IntersectionObserver|MutationObserver|FontFace|OffscreenCanvas|createImageBitmap|DOMParser|XMLHttpRequest|Image|Audio|AudioContext|HTML\w*Element|Element|Node|Event|PointerEvent|KeyboardEvent|MouseEvent|TouchEvent|CustomEvent|WebGL\w*|Worker)\b is not defined/,lt=40,dt=/Component type "(.*?)" is not registered yet — kept as pending on node "(.*?)"/,ut=[/^\[NodeBase\] Script ".*" threw in/,/^\[SceneRunner\] Error during game update/,/^\[GameCommands\]/],Te=async(t,e)=>{let i=performance.now(),o=0,a=[],s=new Map,r=[],d=Me(t.viewport),m=c=>{let p=d.takeRecentMissing(),l=ct.test(c.message)||p.length>0&&/^TypeError\b/.test(c.message);a.push({...c,code:l?"E_SMOKE_DOM":c.code,frame:c.frame??o,...l&&p.length>0?{domAccess:p.slice(-5)}:{}})},f=(c,p)=>{let l=`${c}\0${p}`,R=s.get(l);if(R){R.count+=1;return}s.set(l,{warning:{code:c,frame:o,message:p},count:1})},k=0,L={warn:console.warn,error:console.error,log:console.log,info:console.info,debug:console.debug},b=[],n=0,g=(...c)=>{n+=1,b.length<lt&&b.push(`[frame ${o}] ${c.map(q).join(" ")}`)};console.log=g,console.info=g,console.debug=()=>{},console.warn=(...c)=>{let p=c.find(w=>w instanceof Error);if(p instanceof Se){k+=1;return}let l=c.map(q).join(" ");if(/^Lit is in dev mode/.test(l)||/^THREE\.THREE\.Clock: This module has been deprecated/.test(l)||/^\[AudioService\] Web Audio API is not supported/.test(l))return;let R=dt.exec(l);R?f("W_SMOKE_PENDING_COMPONENT",`${R[1]} on node "${R[2]}" is not registered \u2014 it never runs.`):p instanceof he?f("W_SMOKE_MISSING_RESOURCE",`${p.resource} does not exist (${l.split(":")[0]}).`):/^\[(SceneLoader|AssetLoader|ResourceManager|SceneRunner|SceneService)\]/.test(l)?f("W_SMOKE_LOADER",l):f("W_SMOKE_CONSOLE_WARN",l)},console.error=(...c)=>{let p=c.map(q).join(" ");if(ut.some(R=>R.test(p)))return;let l=c.find(R=>R instanceof Error);m({code:"E_SMOKE_CONSOLE_ERROR",message:p,...l instanceof Error&&l.stack?{stack:l.stack}:{}})};let x=c=>{let{message:p,stack:l}=T(c);m({code:"E_SMOKE_UNHANDLED",phase:"promise",message:p,...l?{stack:l}:{}})},_=c=>{let{message:p,stack:l}=T(c);m({code:"E_SMOKE_UNHANDLED",phase:"timer",message:p,...l?{stack:l}:{}})};process.on("unhandledRejection",x),process.on("uncaughtException",_);let P=ee(c=>{let p=c.phase==="tick"?"E_SMOKE_TICK":c.phase==="command"?"E_SMOKE_COMMAND":"E_SMOKE_SCRIPT";m({code:p,phase:c.phase,message:c.message,...c.componentType?{script:c.componentType}:{},...c.nodeId?{nodeId:c.nodeId}:{},...c.nodeName?{nodeName:c.nodeName}:{},...c.stack?{stack:c.stack}:{}})}),v=null,O={compile:0,load:0,firstFrame:0},E=[],u=0,h=0,K=0,z=!1,V=[],A=()=>{let c=[...E].sort((y,M)=>y-M),p=E.reduce((y,M)=>y+M,0),l=y=>Math.round(y*100)/100;k>0&&r.push(`${k} model/Spine asset load(s) not decoded headless: those nodes exist but have no mesh or skeleton.`),d.imagesLoaded>0&&r.push(`${d.imagesLoaded} image(s) loaded through the DOM (three's TextureLoader) resolved as blank 1\xD71 pictures.`);let R=null,w=Q();if(w){let y=null;try{y=JSON.parse(JSON.stringify(w.snapshot?.()??null))}catch(M){y={error:T(M).message}}R={name:w.name,snapshot:y}}let W=[...s.values()].map(({warning:y,count:M})=>M>1?{...y,count:M}:y);return{ok:a.length===0,scene:t.scene,frames:K,framesRequested:t.frames,firstFrameOk:z&&K>=Math.min(1,t.frames)&&!a.some(y=>y.frame<=1),errors:a,warnings:W,nodes:{start:u,end:h},timingsMs:{compile:l(O.compile),load:l(O.load),firstFrame:l(O.firstFrame),step:{total:l(p),mean:l(E.length>0?p/E.length:0),p95:l(c.length>0?c[Math.min(c.length-1,Math.floor(c.length*.95))]:0),max:l(c.length>0?c[c.length-1]:0)},total:l(performance.now()-i)},scripts:V,domMissing:[...d.missing],notes:r,game:R,logs:{count:n,lines:b}}};try{let c=new H(t.projectRoot),p=new re;pe(p);let l=performance.now(),R=Re(c),w=await xe(c,R.entries,p,e,{esbuildSpecifier:t.esbuildSpecifier,fallbackResolveDir:t.fallbackResolveDir});switch(O.compile=performance.now()-l,w.status){case"unavailable":return{ok:!1,code:"E_SMOKE_UNSUPPORTED",reason:w.reason,scene:t.scene};case"compile-failed":for(let S of w.failures)m({code:"E_SMOKE_SCRIPT_COMPILE",message:`${S.file?`${S.file}${S.line?`:${S.line}`:""}: `:""}${S.message}`});return A();case"import-failed":{let{message:S,stack:C}=T(w.error);m({code:"E_SMOKE_SCRIPT_IMPORT",message:`The project scripts threw when imported (module top level): ${S}`,...C?{stack:C}:{}});for(let D of w.stubbed)f("W_SMOKE_STUBBED_IMPORT",`import "${D}" resolved nowhere and was replaced by an empty module.`);return A()}case"loaded":V=w.registered;for(let S of w.stubbed)f("W_SMOKE_STUBBED_IMPORT",`import "${S}" resolved nowhere (not installed in the project) and was replaced by an empty module \u2014 code using it will not work headless.`);w.bundledPackages.length>0&&r.push(`Bundled from the project's node_modules: ${w.bundledPackages.join(", ")}.`),w.bundledPackages.some(S=>S.startsWith("@dimforge/rapier"))&&r.push("Rapier physics is loaded from the project (WASM, initialised by the game scripts).");break;case"none":break}let W=new fe(c.root),y=new Ee(W),M=new ie(y,p,W),Ne=new de(M),X=document.createElement("canvas");document.body.appendChild(X);let Y=!1;ue(()=>new Promise(()=>{}));let Ce=new ne;v=new me(Ne,at(X,()=>{Y||r.push("The scene has an active PostProcess node: post-processing is not run headless."),Y=!0}),Ce,y,t.viewport),v.setTimeMode({mode:"manual",fixedDeltaSec:1/60,renderEveryNTicks:st,muteAudio:!0}),F(t.localization)&&typeof t.localization.defaultLocale=="string"&&v.setLocalizationConfig(t.localization);let Ie=performance.now();try{await v.loadAndStartScene(t.scene),await Le(it),z=!0}catch(S){let C=S instanceof se&&S.details.length>0?` (${S.details.join("; ")})`:"",{message:D,stack:j}=T(S);return m({code:"E_SMOKE_LOAD",message:`${D}${C}`,...j?{stack:j}:{}}),A()}finally{O.load=performance.now()-Ie}u=_e(v.getLiveRootNodes());for(let S=1;S<=t.frames;S+=1){o=S,d.takeRecentMissing();let C=performance.now(),D=v.stepFrames(1),j=performance.now()-C;if(D===0){f("W_SMOKE_STOPPED",`The runner stopped before frame ${S} (a script stopped or paused the game).`);break}K+=1,E.push(j),S===1&&(O.firstFrame=j),await Le()}return h=_e(v.getLiveRootNodes()),r.push("Audio is silent (no Web Audio in Node); input receives no events; nothing is rendered."),A()}catch(c){let{message:p,stack:l}=T(c);return m({code:"E_SMOKE_TICK",message:p,...l?{stack:l}:{}}),A()}finally{try{v?.stop()}catch{}P(),process.off("unhandledRejection",x),process.off("uncaughtException",_),Object.assign(console,L),d.uninstall()}};process.setSourceMapsEnabled(!0);var gt={runtime:new URL("./runtime.mjs",import.meta.url).href,three:new URL("./three.mjs",import.meta.url).href},ft=await Te(pt,gt);mt?.postMessage(ft);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __pix3CreateRequire } from 'node:module'; const require = __pix3CreateRequire(import.meta.url);
|
|
2
|
-
import{b as d}from"./chunk-
|
|
2
|
+
import{b as d}from"./chunk-CBFYKDS7.mjs";import{Kb as u,Uf as p,ad as y}from"./chunk-VJHJ5BCO.mjs";import"./chunk-P2CBRXPJ.mjs";var S=p,m=e=>Math.round(e*1e6)/1e6,h=e=>{if(typeof e=="number")return m(e);if(e===null||typeof e!="object")return e;let n=e;if(n.isColor===!0&&typeof n.getHexString=="function")return`#${n.getHexString.call(e)}`;if(typeof n.x=="number"&&typeof n.y=="number")return["x","y","z","w"].filter(o=>typeof n[o]=="number").map(o=>m(n[o]));if(Array.isArray(e))return e.map(h);try{return JSON.parse(JSON.stringify(e))}catch{return}},x=e=>{let n=[];for(let[t,o]of Object.entries(e))for(let[a,r]of Object.entries(o.nested??{}))r.schemaName&&n.push({path:`${t}.${a}`,schemaName:r.schemaName});return n},g=new Map,k=e=>{let n={warn:console.warn,log:console.log,info:console.info,debug:console.debug};console.warn=console.log=console.info=console.debug=()=>{};try{return e()}finally{Object.assign(console,n)}},D=e=>{let n=g.get(e);if(n)return n;let t=u(e),o=t?y(t):null,a=o?S[o.classExport]:void 0,r={canonical:t,defaults:{}};if(o&&typeof a=="function"){let f=a,N=typeof f.getPropertySchema=="function"?f.getPropertySchema().properties:[],w=d();try{let b=k(()=>new a({id:"__pix3_tree_default__"})),c=new Map;for(let s of N)try{c.set(s.name,h(s.getValue(b)))}catch{}let l={};for(let[s,i]of c)l[s]=i;for(let{path:s,schemaName:i}of x(o.extras))c.has(i)&&(l[s]=c.get(i));r={canonical:t,defaults:l}}catch{r={canonical:t,defaults:{}}}finally{w()}}return g.set(e,r),r},P=e=>{let n={};for(let t of e)n[t]=D(t);return n};export{D as defaultsForType,P as defaultsForTypes,h as toPlain};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __pix3CreateRequire } from 'node:module'; const require = __pix3CreateRequire(import.meta.url);
|
|
2
|
-
import{Jb as M,Kb as G,Mb as ge,Nb as he,Rf as Re,Sc as me,Tc as ye,Uc as Ee,Uf as ve,Xc as v,Yc as B,Zc as H,_c as K,a as V,ad as z,b as de,bd as q,cd as X,ed as Se,fd as xe,jd as _e,md as we,od as Pe,pa as fe,sa as ue}from"./chunk-
|
|
2
|
+
import{Jb as M,Kb as G,Mb as ge,Nb as he,Rf as Re,Sc as me,Tc as ye,Uc as Ee,Uf as ve,Xc as v,Yc as B,Zc as H,_c as K,a as V,ad as z,b as de,bd as q,cd as X,ed as Se,fd as xe,jd as _e,md as we,od as Pe,pa as fe,sa as ue}from"./chunk-CFQFEI52.js";import{d as U,pd as pe}from"./chunk-6ACT6FNV.js";import{existsSync as rr,statSync as nr}from"node:fs";import{resolve as ce}from"node:path";var be=U(V(),1);import{readFileSync as pt}from"node:fs";import{dirname as ft,join as ut,resolve as gt}from"node:path";var ht="pix3project.yaml";var $e=n=>{let e=gt(n);for(;;)try{return pt(ut(e,ht)),e}catch{let t=ft(e);if(t===e)return null;e=t}};var ke={E_YAML:{severity:"error",level:1,summary:"the file is not valid YAML"},E_SHAPE:{severity:"error",level:1,summary:"document structure is wrong (root, node, component or override shape)"},E_UNKNOWN_NODE_TYPE:{severity:"error",level:1,summary:"unknown `type:`"},W_TYPE_CASE:{severity:"warning",level:1,summary:"`type:` loads, but is not the canonical spelling"},E_UNKNOWN_PROPERTY:{severity:"error",level:1,summary:"a key under `properties:` the loader never reads for this type"},W_WRITE_ONLY_PROPERTY:{severity:"warning",level:1,summary:"the editor saves this property but the loader does not read it back"},W_LEGACY_KEY:{severity:"warning",level:1,summary:"a read-compat spelling; the editor rewrites it on save"},E_PROPERTY_TYPE:{severity:"error",level:1,summary:"value has the wrong type"},E_PROPERTY_RANGE:{severity:"error",level:1,summary:"value rejected by the property's validation rule (e.g. fov > 0)"},W_PROPERTY_RANGE:{severity:"warning",level:1,summary:"number outside the inspector's min..max (a UI range, not a load error)"},E_PROPERTY_ENUM:{severity:"error",level:1,summary:"value is not one of the options"},E_UNKNOWN_COMPONENT:{severity:"error",level:1,summary:"unknown component type"},E_UNKNOWN_CONFIG_KEY:{severity:"error",level:1,summary:"component config key the component does not declare (`user:` ones at level 2)"},E_USER_SCRIPT_NOT_FOUND:{severity:"error",level:1,summary:"no script under scripts/ exports a Script class with this name"},E_MISSING_RESOURCE:{severity:"error",level:1,summary:"referenced file does not exist"},E_MISSING_PREFAB:{severity:"error",level:1,summary:"`instance:` target does not exist"},E_PREFAB_CYCLE:{severity:"error",level:1,summary:"prefab instances form a cycle"},E_PREFAB_ROOT:{severity:"error",level:1,summary:"an instanced prefab must have exactly one root node"},E_UNKNOWN_OVERRIDE_TARGET:{severity:"error",level:1,summary:"`overrides.byLocalId` names a node the prefab does not have"},E_DUPLICATE_ID:{severity:"error",level:1,summary:"two nodes share an id"},E_EMOJI_AS_ART:{severity:"error",level:1,summary:"text that is nothing but emoji \u2014 a picture standing in for a sprite"},E_SVG_INVALID:{severity:"error",level:1,summary:"a referenced .svg has no <svg> root or no SVG xmlns \u2014 the browser will not decode it"},E_SVG_NO_SIZE:{severity:"error",level:1,summary:"a referenced .svg has no usable width/height (and no viewBox to derive one)"},W_SVG_VIEWBOX_ONLY:{severity:"warning",level:1,summary:"a referenced .svg has a viewBox but no width/height \u2014 renders at 300x150"},W_SVG_EXTERNAL_REF:{severity:"warning",level:1,summary:"a referenced .svg points outside itself (href, url(), @import) \u2014 never loads as an image"},W_LEGACY_VERSION:{severity:"warning",level:1,summary:"scene `version:` is missing or not the current format version"},W_UNUSED_ASSET:{severity:"warning",level:1,summary:"a file under sprites/ or audio/ nothing references (whole-project runs only)"},E_LOAD:{severity:"error",level:2,summary:"the loader rejected the scene or warned"},E_PENDING_COMPONENT:{severity:"error",level:2,summary:"a component stayed unregistered after the scripts compiled"},E_SCRIPT_COMPILE:{severity:"error",level:2,summary:"the project scripts do not compile"},W_SCRIPT_IMPORT:{severity:"warning",level:2,summary:"compiled scripts threw on import in Node; user: properties not checked"},W_HYDRATE_SKIPPED:{severity:"warning",level:2,summary:"level 2 did not run"},W_RENDERABILITY:{severity:"warning",level:2,summary:"the scene may not show anything (W_RENDERABILITY_<ISSUE>)"}},mt=n=>n.startsWith("W_")?"warning":"error",m=n=>{let e={severity:mt(n.code),code:n.code,file:n.file,message:n.message};return n.nodeId!==void 0&&(e.nodeId=n.nodeId),n.path!==void 0&&(e.path=n.path),n.line!==void 0&&(e.line=n.line),n.fix!==void 0&&(e.fix=n.fix),e},Ne=(n,e)=>n.file.localeCompare(e.file)||(n.line??Number.MAX_SAFE_INTEGER)-(e.line??Number.MAX_SAFE_INTEGER)||(n.path??"").localeCompare(e.path??"")||n.code.localeCompare(e.code);var Ie=U(V(),1);import{createHash as yt}from"node:crypto";import{readdirSync as Et,readFileSync as Te}from"node:fs";import{isAbsolute as St,join as Q,relative as Ae,resolve as Oe,sep as De}from"node:path";var _=U(V(),1),J=n=>{let e="";for(let t of n)typeof t=="number"?e+=`[${t}]`:e+=e.length===0?t:`.${t}`;return e},Z=n=>{let e=new _.LineCounter,t=(0,_.parseDocument)(n,{lineCounter:e,prettyErrors:!1,uniqueKeys:!0});if(t.errors.length>0)return{errors:t.errors.map(s=>({message:s.message.split(`
|
|
3
3
|
`)[0]??s.message,line:s.linePos?.[0]?.line}))};let r=s=>s===void 0?void 0:e.linePos(s).line;return{data:t.toJS({maxAliasCount:1e3}),lineOf(s){let o=t.contents,i=r(o?.range?.[0]);for(let a of s)if((0,_.isMap)(o)){let c=o.items.find(l=>(0,_.isScalar)(l.key)?l.key.value===a:l.key===a);if(!c)return i;i=r((0,_.isScalar)(c.key)?c.key.range?.[0]:void 0)??i,o=c.value}else if((0,_.isSeq)(o)&&typeof a=="number"){let c=o.items[a];if(!c)return i;i=r(c.range?.[0])??i,o=c}else return i;return i}}},p=n=>typeof n=="object"&&n!==null&&!Array.isArray(n);var xt=new Set(["node_modules",".yalc",".git",".pix3","dist",".vite",".cache"]),C=".pix3scene",k=class{root;files;fileSet;textCache=new Map;constructor(e){this.root=Oe(e),this.files=Ce(this.root,this.root).sort(),this.fileSet=new Set(this.files)}has(e){return this.fileSet.has(e)}absolute(e){return Q(this.root,e)}relativeOf(e){let t=Ae(this.root,Oe(e));return t.startsWith("..")||St(t)?null:t.split(De).join("/")}readText(e){let t=this.textCache.get(e);if(t!==void 0)return t;let r=Te(this.absolute(e),"utf8");return this.textCache.set(e,r),r}scenes(){return this.files.filter(e=>e.endsWith(C))}},Ce=(n,e)=>{let t=[],r;try{r=Et(e,{withFileTypes:!0})}catch{return t}for(let s of r)if(s.isDirectory()){if(xt.has(s.name))continue;t.push(...Ce(n,Q(e,s.name)))}else s.isFile()&&t.push(Ae(n,Q(e,s.name)).split(De).join("/"));return t},T=n=>{let e=n.trim();if(e.length===0)return null;let t=/^([a-z][a-z0-9+.-]*):/i.exec(e)?.[1]?.toLowerCase();if(t&&t!=="res")return null;let s=(t==="res"?e.replace(/^res:\/\//i,""):e).replace(/[?#].*$/,""),o=[];for(let i of s.replace(/\\/g,"/").split("/"))if(!(i===""||i===".")){if(i===".."){if(o.length===0)return null;o.pop();continue}o.push(_t(i))}return o.length===0?null:o.join("/")},_t=n=>{try{return decodeURIComponent(n)}catch{return n}};var je=(n,e)=>yt("sha256").update(Te(n.absolute(e))).digest("hex"),Le=n=>{if(!n.has("pix3project.yaml"))return{};try{let e=(0,Ie.parse)(n.readText("pix3project.yaml"));return p(e)?typeof e.targetPlatform=="string"?{targetPlatform:e.targetPlatform}:{}:{}}catch{return{}}};var wt=(n,e)=>{if(n===e)return 0;if(n.length===0)return e.length;if(e.length===0)return n.length;let t=Array.from({length:e.length+1},(r,s)=>s);for(let r=1;r<=n.length;r++){let s=[r];for(let o=1;o<=e.length;o++){let i=t[o-1]+(n[r-1]===e[o-1]?0:1);s[o]=Math.min(s[o-1]+1,t[o]+1,i)}t=s}return t[e.length]},b=(n,e)=>{let t=n.toLowerCase(),r,s=Number.POSITIVE_INFINITY;for(let i of e){if(i===n)continue;if(i.toLowerCase()===t)return i;let a=wt(t,i.toLowerCase());a<s&&(s=a,r=i)}let o=n.length>=10?3:2;return s<=o?r:void 0};var We="http://www.w3.org/2000/svg",Pt=/^\s*(\d+(?:\.\d+)?|\.\d+)(?:e[+-]?\d+)?\s*(px|pt|pc|mm|cm|in|q|em|ex)?\s*$/i,Rt=n=>{let e=n.replace(/^\uFEFF/,"");for(;;)if(e=e.replace(/^\s+/,""),e.startsWith("<?")){let r=e.indexOf("?>");if(r<0)return null;e=e.slice(r+2)}else if(e.startsWith("<!--")){let r=e.indexOf("-->");if(r<0)return null;e=e.slice(r+3)}else if(/^<!DOCTYPE/i.test(e)){let r=/^<!DOCTYPE[^>[]*(\[[\s\S]*?\])?[^>]*>/i.exec(e);if(!r)return null;e=e.slice(r[0].length)}else break;let t=/^<((?:[A-Za-z_][\w.-]*:)?svg)(?=[\s/>])[^>]*>/.exec(e);return t?t[0]:null},j=(n,e)=>{let r=new RegExp(`\\s${e.replace(":","\\:")}\\s*=\\s*(?:"([^"]*)"|'([^']*)')`,"i").exec(n);return r?r[1]??r[2]:void 0},Ye=n=>{if(n===void 0)return!1;let e=Pt.exec(n);return e!==null&&Number(e[1])>0},vt=n=>{if(n===void 0)return!1;let e=n.trim().split(/[\s,]+/).map(Number);return e.length===4&&e.every(Number.isFinite)&&e[2]>0&&e[3]>0},bt=n=>{let e=[],t=r=>{let s=r.trim();return s!==""&&!s.startsWith("#")&&!/^data:/i.test(s)};for(let r of n.matchAll(/\s(?:xlink:)?href\s*=\s*(?:"([^"]*)"|'([^']*)')/gi)){let s=r[1]??r[2]??"";t(s)&&e.push(`href="${s.trim()}"`)}for(let r of n.matchAll(/url\(\s*(['"]?)([^)'"]*)\1\s*\)/gi))t(r[2])&&e.push(`url(${r[2].trim()})`);for(let r of n.matchAll(/@import\s+([^;]+);?/gi))e.push(`@import ${r[1].trim()}`);return[...new Set(e)]},Fe='start from <svg xmlns="http://www.w3.org/2000/svg" width="W" height="H" viewBox="0 0 W H">',$t=n=>{let e=Rt(n);if(!e)return[{code:"E_SVG_INVALID",message:"the file does not start with an <svg> root element, so no browser decodes it.",fix:Fe}];let t=[],r=/^<([A-Za-z_][\w.-]*):svg/.exec(e)?.[1],s=j(e,r?`xmlns:${r}`:"xmlns");s!==We&&t.push({code:"E_SVG_INVALID",message:`the <svg> root has ${s===void 0?"no xmlns":`xmlns="${s}"`}; as an image (which every texture load is) the browser refuses to decode it.`,fix:`add xmlns="${We}" to the <svg> tag`});let o=Ye(j(e,"width")),i=Ye(j(e,"height")),a=vt(j(e,"viewBox"));!o&&!i?t.push(a?{code:"W_SVG_VIEWBOX_ONLY",message:"the <svg> root has a viewBox but no width/height (or only % / style sizes): browsers give it no natural size \u2014 Chrome rasterises it into a 300x150 box with the art letterboxed inside, so the sprite has the wrong size and aspect.",fix:"add width/height in px to the <svg> tag (the viewBox size, or the size the node draws it at)"}:{code:"E_SVG_NO_SIZE",message:"the <svg> root has no width/height and no viewBox: it rasterises into a default 300x150 box and the art is cropped to it.",fix:`add width/height in px and a matching viewBox \u2014 ${Fe}`}):o!==i&&!a&&t.push({code:"E_SVG_NO_SIZE",message:`the <svg> root has only ${o?"width":"height"} and no viewBox: the missing dimension defaults to ${o?"150":"300"}px.`,fix:`add ${o?"height":"width"} in px (and a viewBox) to the <svg> tag`});let c=bt(n);return c.length>0&&t.push({code:"W_SVG_EXTERNAL_REF",message:`references outside the file (${c.slice(0,3).join(", ")}${c.length>3?", \u2026":""}) never load when an SVG is drawn as an image \u2014 not in the editor, not in play mode, not in the export.`,fix:"inline the shapes or embed the image as a data: URI; use generic font families (sans-serif), no webfonts"}),t},Ue=new WeakMap,Ve=(n,e)=>{let t=Ue.get(n);t||(t=new Map,Ue.set(n,t));let r=t.get(e);if(!r){let s;try{s=n.readText(e)}catch{s=""}r=$t(s),t.set(e,r)}return r},Me=n=>/\.svg$/i.test(n);var y=n=>n===null?"null":Array.isArray(n)?`an array of ${n.length}`:typeof n=="string"?`the string ${JSON.stringify(n)}`:typeof n=="object"?"a mapping":`${typeof n} ${String(n)}`,te=n=>typeof n=="number"&&Number.isFinite(n),kt=/^(#([0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})|(rgb|rgba|hsl|hsla)\([^)]*\)|[a-z]+)$/i,Nt=n=>{let e=n.ui?.options;return Array.isArray(e)?e:p(e)?Object.values(e):[]},ee=(n,e)=>{if(Array.isArray(n)){if(n.length<e.length)return`expected ${e.length} numbers [${e.join(", ")}], got ${y(n)}`;let t=n.slice(0,e.length).findIndex(r=>!te(r));return t===-1?null:`component ${t} is ${y(n[t])}, not a number`}if(p(n)){let t=e.find(r=>r in n&&!te(n[r]));return t?`${t} is ${y(n[t])}, not a number`:e.some(r=>r in n)?null:`expected {${e.join(", ")}}`}return`expected [${e.join(", ")}], got ${y(n)}`},S=(n,e)=>({code:"E_PROPERTY_TYPE",message:n,fix:e}),Ge=n=>n.ui?.editor?.endsWith("-resource")===!0||n.ui?.resourceType!==void 0,re=(n,e,t=n.name)=>{switch(n.type){case"number":{if(!te(e)){let i=typeof e=="string"&&e.trim()!==""&&Number.isFinite(Number(e));return S(`${t} must be a number, got ${y(e)}.`,i?`write ${t}: ${Number(e)} (no quotes)`:void 0)}let r=n.validation?.validate(e);if(r===!1||typeof r=="string")return{code:"E_PROPERTY_RANGE",message:`${t} is ${e}: ${typeof r=="string"?r:"rejected by the property's validation"}.`};let s=n.ui?.min,o=n.ui?.max;return s!==void 0&&e<s||o!==void 0&&e>o?{code:"W_PROPERTY_RANGE",message:`${t} is ${e}, outside the inspector's ${s??"-\u221E"}..${o??"\u221E"} range; it loads as written, but the inspector cannot produce it.`}:null}case"boolean":return typeof e=="boolean"?null:S(`${t} must be true or false, got ${y(e)}.`,e==="true"||e==="false"?`write ${t}: ${e} (no quotes)`:void 0);case"string":return e===null||typeof e=="string"?null:S(`${t} must be a string, got ${y(e)}.`,typeof e=="number"||typeof e=="boolean"?`quote it: ${t}: "${String(e)}"`:void 0);case"color":return e===null?null:typeof e!="string"?S(`${t} must be a colour string like "#ff8800", got ${y(e)}.`,typeof e=="number"?`write ${t}: "#${e.toString(16).padStart(6,"0")}"`:void 0):kt.test(e.trim())?null:S(`${t} is not a colour: ${JSON.stringify(e)}.`,'use "#rrggbb"');case"enum":case"select":{let r=Nt(n);if(r.length===0||r.includes(e))return null;let s=typeof e=="string"?r.find(o=>typeof o=="string"&&o.toLowerCase()===e.toLowerCase()):void 0;return{code:"E_PROPERTY_ENUM",message:`${t} is ${y(e)}; allowed: ${r.map(o=>JSON.stringify(o)).join(", ")}.`,fix:s!==void 0?`write ${t}: ${String(s)}`:void 0}}case"vector2":{let r=ee(e,["x","y"]);return r?S(`${t}: ${r}.`,`write ${t}: [x, y]`):null}case"vector3":case"euler":{let r=ee(e,["x","y","z"]);return r?S(`${t}: ${r}.`,`write ${t}: [x, y, z]`):null}case"vector4":{let r=ee(e,["x","y","z","w"]);return r?S(`${t}: ${r}.`,`write ${t}: [x, y, z, w]`):null}case"node":return e===null||typeof e=="string"?null:S(`${t} must be a node id (string), got ${y(e)}.`);case"object":return Ge(n)?ne("texture",e,t):null;default:return null}},ne=(n,e,t,r)=>{switch(n){case"texture":return e===null||typeof e=="string"||p(e)&&typeof e.url=="string"?null:S(`${t} must be a texture: { type: texture, url: res://\u2026 } or a path string, got ${y(e)}.`);case"resource-path":return e===null||typeof e=="string"?null:S(`${t} must be a path string (res://\u2026), got ${y(e)}.`);case"array":return Array.isArray(e)?null:S(`${t} must be a list, got ${y(e)}.`);case"record":return p(e)?null:S(`${t} must be a mapping, got ${y(e)}.`);case"enum":return r===void 0||r.includes(e)?null:{code:"E_PROPERTY_ENUM",message:`${t} is ${y(e)}; allowed: ${r.join(", ")}.`};default:return re({name:t,type:n,getValue:()=>{},setValue:()=>{}},e,t)}},Be=Ge;var Ot=ve,He=new Map,se=n=>{let e=He.get(n.type);if(e)return e;let t=Ot[n.classExport],r=typeof t?.getPropertySchema=="function"?t.getPropertySchema().properties:[];return He.set(n.type,r),r},L=class{constructor(e){this.project=e}cache=new Map;get(e){let t=this.cache.get(e);if(t)return t;let r;if(!this.project.has(e))r={ok:!1,reason:"missing"};else{let s=Z(this.project.readText(e));if("errors"in s||!p(s.data))r={ok:!1,reason:"unparsable"};else{let o=s.data.root;r={ok:!0,roots:Array.isArray(o)?o:[]}}}return this.cache.set(e,r),r}instanceTargets(e){let t=this.get(e);if(!t.ok)return[];let r=[],s=o=>{if(p(o)){if(typeof o.instance=="string"){let i=T(o.instance);i&&r.push(i)}Array.isArray(o.children)&&o.children.forEach(s)}};return t.roots.forEach(s),r}findCycle(e,t){if(t.includes(e))return[...t.slice(t.indexOf(e)),e];let r=[...t,e];for(let s of this.instanceTargets(e)){let o=this.findCycle(s,r);if(o)return o}return null}effectiveDefinition(e,t=new Set){if(typeof e.instance!="string")return e;let r=T(e.instance);if(!r||t.has(r))return null;let s=this.get(r);return!s.ok||s.roots.length!==1||!p(s.roots[0])?null:this.effectiveDefinition(s.roots[0],new Set([...t,r]))}localIdOf(e){let t=this.effectiveDefinition(e);return t&&typeof t.id=="string"?t.id:null}},Ke=/^res:\/\//i,W=class{constructor(e,t,r){this.env=e;this.file=t;this.parsed=r}diagnostics=[];references=new Set;usesUserComponents=!1;svgChecked=new Set;seenIds=new Map;report(e){let{at:t,...r}=e;this.diagnostics.push(m({...r,file:this.file,path:t?J(t):r.path,line:t?this.parsed.lineOf(t):void 0}))}run(){let e=this.parsed.data;if(!p(e)){this.report({code:"E_SHAPE",message:`A scene must be a YAML mapping with a root: list, got ${e===null?"an empty document":typeof e}.`,fix:"start the file with `version: 1.0.0` and `root:`",at:[]});return}for(let t of Object.keys(e))B.includes(t)||this.report({code:"E_SHAPE",message:`"${t}" is not a scene document key (allowed: ${B.join(", ")}); the loader ignores it.`,fix:t==="nodes"||t==="children"?"rename it to root:":void 0,at:[t]});if(e.version===void 0?this.report({code:"W_LEGACY_VERSION",message:`The scene has no version:; the current format is ${v}.`,fix:`add version: ${v}`,at:[]}):String(e.version)!==v&&this.report({code:"W_LEGACY_VERSION",message:`Scene format version ${String(e.version)} is not the current ${v}; the loader has no migrations and reads it as ${v}.`,fix:`set version: ${v}`,at:["version"]}),e.metadata!==void 0&&e.metadata!==null&&!p(e.metadata)&&this.report({code:"E_SHAPE",message:"metadata: must be a mapping.",at:["metadata"]}),e.root===void 0||e.root===null){this.report({code:"E_SHAPE",message:"The scene has no root: list \u2014 it would load as an empty scene.",fix:"add root: with at least one node",at:[]});return}if(!Array.isArray(e.root)){this.report({code:"E_SHAPE",message:`root: must be a list of nodes, got ${p(e.root)?"a mapping":typeof e.root}.`,fix:"write each root node as a list item: root:\\n - id: \u2026",at:["root"]});return}e.root.forEach((t,r)=>this.checkNode(t,["root",r]))}checkNode(e,t){if(!p(e)){this.report({code:"E_SHAPE",message:`A node must be a mapping with at least id: and type:, got ${e===null?"null":typeof e}.`,at:t});return}let r=typeof e.id=="string"&&e.id.trim().length>0?e.id:void 0;if(r===void 0)this.report({code:"E_SHAPE",message:e.id===void 0?"The node has no id: \u2014 the loader accepts it with an undefined id, and a second one collides.":`id: must be a non-empty string, got ${JSON.stringify(e.id)}.`,fix:"give every node a unique string id:",at:e.id===void 0?t:[...t,"id"]});else{let a=this.seenIds.get(r);a!==void 0?this.report({code:"E_DUPLICATE_ID",nodeId:r,message:`Duplicate node id "${r}" (first used at ${a}); the loader rejects the scene.`,fix:"rename one of them",at:[...t,"id"]}):this.seenIds.set(r,J(t))}let s=r;for(let a of Object.keys(e))H.includes(a)||this.report({code:"E_SHAPE",nodeId:s,message:`"${a}" is not a node key (allowed: ${H.join(", ")}); the loader ignores it.`,fix:"if it is a property, move it under properties:",at:[...t,a]});for(let a of["name","type"])e[a]!==void 0&&typeof e[a]!="string"&&this.report({code:"E_SHAPE",nodeId:s,message:`${a}: must be a string.`,at:[...t,a]});e.groups!==void 0&&!(Array.isArray(e.groups)&&e.groups.every(a=>typeof a=="string"))&&this.report({code:"E_SHAPE",nodeId:s,message:"groups: must be a list of strings.",at:[...t,"groups"]}),e.metadata!==void 0&&e.metadata!==null&&!p(e.metadata)&&this.report({code:"E_SHAPE",nodeId:s,message:"metadata: must be a mapping.",at:[...t,"metadata"]});let o=e.properties;o!=null&&!p(o)&&this.report({code:"E_SHAPE",nodeId:s,message:`properties: must be a mapping, got ${Array.isArray(o)?"a list":typeof o}.`,at:[...t,"properties"]});let i=p(o)?o:{};if(e.instance!==void 0){this.checkInstanceNode(e,s,i,t);return}this.checkNodeType(e,s,i,t),this.checkComponents(e.components,s,t),e.children!==void 0&&e.children!==null&&(Array.isArray(e.children)?e.children.forEach((a,c)=>this.checkNode(a,[...t,"children",c])):this.report({code:"E_SHAPE",nodeId:s,message:`children: must be a list of nodes, got ${p(e.children)?"a mapping":typeof e.children}.`,at:[...t,"children"]}))}checkNodeType(e,t,r,s){let o=typeof e.type=="string"?e.type:void 0,i=o===void 0?"Node3D":G(o);if(i==="Layout2D"){this.report({code:"E_UNKNOWN_NODE_TYPE",nodeId:t,message:"Layout2D is no longer supported; the loader rejects the scene.",fix:"use a Group2D (or Node2D) with layout: anchors",at:[...s,"type"]});return}if(i===null){let c=o?ge(o):void 0;this.report({code:"E_UNKNOWN_NODE_TYPE",nodeId:t,message:he(String(e.name??t??"?"),String(o)),fix:c?`type: ${c}`:void 0,at:[...s,"type"]});return}if(o!==void 0&&o!==i){let c=M(o)===M(i);this.report({code:"W_TYPE_CASE",nodeId:t,message:c?`type: ${o} loads as ${i}, but only because the loader forgives case and separators; the editor rewrites it on save.`:`type: ${o} is a read-compat alias of ${i}; the editor rewrites it on save.`,fix:`type: ${i}`,at:[...s,"type"]})}let a=z(i);a&&this.checkNodeProperties(a,r,t,[...s,"properties"])}checkNodeProperties(e,t,r,s){let o=se(e);for(let[i,a]of Object.entries(t)){let c=[...s,i],l=q(e,o,i);switch(l.kind){case"schema":this.checkSchemaValue(l.property,a,r,c,i);break;case"write-only":this.report({code:"W_WRITE_ONLY_PROPERTY",nodeId:r,message:`${e.type}.${i} is saved by the editor but not read back by the loader, so it has no effect after a reload.`,at:c});break;case"extra":this.checkRule(e,l.rule,a,r,c,i);break;case"relocated":this.report({code:"E_UNKNOWN_PROPERTY",nodeId:r,message:`${e.type} does not read "${i}" here \u2014 on disk it lives at ${l.diskPath}. As written it loads, is saved back, and does nothing.`,fix:`move it to properties.${l.diskPath}`,at:c});break;case"not-stored":this.report({code:"E_UNKNOWN_PROPERTY",nodeId:r,message:`"${i}" is not stored under properties: \u2014 ${l.reason}.`,fix:i==="id"||i==="name"||i==="type"||i==="groups"?`move it up to the node entry (${i}:)`:"remove it",at:c});break;case"unknown":{let d=[...o.filter(f=>q(e,o,f.name).kind==="schema").map(f=>f.name),...Object.keys(e.extras)],u=b(i,d);this.report({code:"E_UNKNOWN_PROPERTY",nodeId:r,message:`${e.type} has no property "${i}"; the loader keeps it, saves it back, and nothing reads it.`,fix:u?`did you mean ${u}?`:void 0,at:c});break}}this.checkStrings(a,c,r)}}checkRule(e,t,r,s,o,i){t.preferred&&this.report({code:"W_LEGACY_KEY",nodeId:s,message:`${i} is a read-compat spelling; the editor saves it as ${t.preferred}.`,fix:`rename to ${t.preferred}`,at:o});let a=se(e),c=t.schemaName?a.find(l=>l.name===t.schemaName):void 0;if(c)this.checkSchemaValue(c,r,s,o,i);else if(t.kind){let l=ne(t.kind,r,i,t.options);l&&this.report({...l,nodeId:s,at:o}),!l&&(t.kind==="texture"||t.kind==="resource-path")&&this.checkResourceValue(r,s,o)}if(t.nested&&p(r))for(let[l,d]of Object.entries(r)){let u=t.nested[l],f=[...o,l];if(!u){let h=b(l,Object.keys(t.nested));this.report({code:"E_UNKNOWN_PROPERTY",nodeId:s,message:`${i}.${l} is not read by the loader (known: ${Object.keys(t.nested).join(", ")}).`,fix:h?`did you mean ${i}.${h}?`:void 0,at:f});continue}this.checkRule(e,u,d,s,f,`${i}.${l}`)}}checkSchemaValue(e,t,r,s,o){let i=re(e,t,o);if(i){this.report({...i,nodeId:r,at:s});return}Be(e)&&this.checkResourceValue(t,r,s)}checkResourceValue(e,t,r){let s=typeof e=="string"?e:p(e)&&typeof e.url=="string"?e.url:null;!s||Ke.test(s)||s.trim()===""||this.checkReference(s,t,p(e)?[...r,"url"]:r)}checkReference(e,t,r){let s=T(e);if(!s)return;if(this.references.add(s),this.env.project.has(s)){Me(s)&&this.checkSvg(s,e,t,r);return}let o=this.env.project.files.find(i=>i.toLowerCase()===s.toLowerCase());this.report({code:"E_MISSING_RESOURCE",nodeId:t,message:`${e} does not exist in the project.`,fix:o?`the file is res://${o} (case differs)`:void 0,at:r})}checkSvg(e,t,r,s){if(!this.svgChecked.has(e)){this.svgChecked.add(e);for(let o of Ve(this.env.project,e))this.report({code:o.code,nodeId:r,message:`${t}: ${o.message}`,fix:o.fix,at:s})}}checkStrings(e,t,r){if(typeof e=="string"){Ke.test(e)&&this.checkReference(e,r,t);let s=[...t].reverse().find(o=>typeof o=="string");s&&xe(s)&&Se(e)&&this.report({code:"E_EMOJI_AS_ART",nodeId:r,message:`${s} is ${e.trim()} \u2014 nothing but emoji, i.e. a picture standing in for art. It draws differently on every platform, cannot be recoloured, atlased or animated, and is a hollow box where the font lacks it.`,fix:"use a Sprite2D with a generated sprite (or a ColorRect2D placeholder); an emoji inside a sentence is fine",at:t});return}if(Array.isArray(e))e.forEach((s,o)=>this.checkStrings(s,[...t,o],r));else if(p(e))for(let[s,o]of Object.entries(e))this.checkStrings(o,[...t,s],r)}checkComponents(e,t,r){if(e==null)return;let s=[...r,"components"];if(!Array.isArray(e)){this.report({code:"E_SHAPE",nodeId:t,message:`components: must be a list, got ${p(e)?"a mapping":typeof e}.`,fix:"write each component as a list item: components:\\n - type: core:Rotate",at:s});return}e.forEach((o,i)=>this.checkComponent(o,t,[...s,i]))}checkComponent(e,t,r){if(!p(e)){this.report({code:"E_SHAPE",nodeId:t,message:"A component must be a mapping with type:.",at:r});return}for(let a of Object.keys(e))K.includes(a)||this.report({code:"E_SHAPE",nodeId:t,message:`"${a}" is not a component key (allowed: ${K.join(", ")}).`,fix:"component settings go under config:",at:[...r,a]});let s=e.type;if(typeof s!="string"||s.trim()===""){this.report({code:"E_SHAPE",nodeId:t,message:"The component has no type: \u2014 the loader parks it as an unregistered component.",fix:"add type: core:<Name> or user:<ExportedClass>",at:r});return}e.enabled!==void 0&&typeof e.enabled!="boolean"&&this.report({code:"E_SHAPE",nodeId:t,message:"enabled: must be true or false.",at:[...r,"enabled"]}),e.id!==void 0&&typeof e.id!="string"&&this.report({code:"E_SHAPE",nodeId:t,message:"A component id: must be a string.",at:[...r,"id"]});let o=e.config;o!=null&&!p(o)&&this.report({code:"E_SHAPE",nodeId:t,message:"config: must be a mapping.",at:[...r,"config"]});let i=p(o)?o:{};if(this.checkStrings(i,[...r,"config"],t),s.startsWith("core:")){if(!this.env.registry.getComponentType(s)){let l=b(s,this.env.registry.getAllComponentTypes().map(d=>d.id));this.report({code:"E_UNKNOWN_COMPONENT",nodeId:t,message:`${s} is not a built-in component; the loader parks it and it never runs.`,fix:l?`type: ${l}`:void 0,at:[...r,"type"]});return}let c=this.env.registry.getComponentPropertySchema(s)?.properties??[];this.checkConfig(s,c,i,t,[...r,"config"]);return}if(s.startsWith("user:")){if(this.usesUserComponents=!0,this.env.userScripts.ids.has(s)||this.env.userScripts.opaqueEntries.length>0)return;let a=b(s,this.env.userScripts.ids.keys()),c=s.slice(5);this.report({code:"E_USER_SCRIPT_NOT_FOUND",nodeId:t,message:`No script under scripts/ (or src/scripts/) exports a Script class named ${c}; the component would stay unregistered. The id is the EXPORT name, and the file must contain "extends Script".`,fix:a?`type: ${a}`:`create scripts/${c}.ts with export class ${c} extends Script`,at:[...r,"type"]});return}this.report({code:"E_UNKNOWN_COMPONENT",nodeId:t,message:`Component type "${s}" has no namespace: built-ins are core:<Name>, project scripts user:<ExportedClass>.`,fix:this.env.registry.getComponentType(`core:${s}`)?`type: core:${s}`:`type: user:${s}`,at:[...r,"type"]})}checkConfig(e,t,r,s,o){for(let[i,a]of Object.entries(r)){let c=t.find(l=>l.name===i);if(!c){let l=b(i,t.map(d=>d.name));this.report({code:"E_UNKNOWN_CONFIG_KEY",nodeId:s,message:`${e} has no setting "${i}" (declared: ${t.map(d=>d.name).join(", ")||"none"}); it is kept and ignored.`,fix:l?`did you mean ${l}?`:void 0,at:[...o,i]});continue}this.checkSchemaValue(c,a,s,[...o,i],i)}}checkInstanceNode(e,t,r,s){for(let u of["children","components"])e[u]!==void 0&&this.report({code:"E_SHAPE",nodeId:t,message:`${u}: on an instance node is ignored \u2014 the node's content comes from the prefab.`,fix:"move them into the prefab, or wrap the instance in a parent node",at:[...s,u]});if(typeof e.instance!="string"||e.instance.trim()===""){this.report({code:"E_SHAPE",nodeId:t,message:"instance: must be a res:// path to a .pix3scene prefab.",at:[...s,"instance"]});return}let o=T(e.instance),i=[...s,"instance"];if(!o||!this.env.project.has(o)){this.report({code:"E_MISSING_PREFAB",nodeId:t,message:`Prefab ${e.instance} does not exist; the loader fails the whole scene.`,at:i});return}this.references.add(o);let a=this.env.prefabs.findCycle(o,[this.file]);if(a){this.report({code:"E_PREFAB_CYCLE",nodeId:t,message:`Prefab instances form a cycle: ${a.join(" -> ")}.`,at:i});return}let c=this.env.prefabs.get(o);if(!c.ok)return;if(c.roots.length!==1){this.report({code:"E_PREFAB_ROOT",nodeId:t,message:`Prefab ${e.instance} has ${c.roots.length} root nodes; an instanced prefab must have exactly one.`,at:i});return}let l=p(c.roots[0])?c.roots[0]:null,d=l?this.env.prefabs.effectiveDefinition(l):null;d&&this.checkInstanceProperties(d,r,t,[...s,"properties"]),this.checkOverrides(e.overrides,l,t,[...s,"overrides"])}checkInstanceProperties(e,t,r,s){let o=typeof e.type=="string"?G(e.type):"Node3D",i=o?z(o):null;if(!i)return;let a=se(i);for(let[c,l]of Object.entries(t)){let d=[...s,c];if(this.checkStrings(l,d,r),c==="transform"){if(!p(l)){this.report({code:"E_PROPERTY_TYPE",nodeId:r,message:"transform must be a mapping.",at:d});continue}for(let[f,h]of Object.entries(l)){let g=X[f],E=g?a.find(x=>x.name===g):void 0;if(!E){this.report({code:"E_UNKNOWN_PROPERTY",nodeId:r,message:`transform.${f} is not applied to an instance (known: ${Object.keys(X).join(", ")}).`,at:[...d,f]});continue}this.checkSchemaValue(E,h,r,[...d,f],`transform.${f}`)}continue}let u=a.find(f=>f.name===c);if(!u){let f=b(c,a.map(h=>h.name));this.report({code:"E_UNKNOWN_PROPERTY",nodeId:r,message:`The prefab's ${i.type} has no property "${c}"; on an instance (and in overrides) properties are the node's schema names.`,fix:f?`did you mean ${f}?`:void 0,at:d});continue}this.checkSchemaValue(u,l,r,d,c)}}checkOverrides(e,t,r,s){if(e==null)return;if(!p(e)||e.byLocalId!==void 0&&!p(e.byLocalId)){this.report({code:"E_SHAPE",nodeId:r,message:"overrides: must be a mapping of the form { byLocalId: { <node path>: { properties: \u2026 } } }.",at:s});return}let o=p(e.byLocalId)?e.byLocalId:{};for(let[i,a]of Object.entries(o)){let c=[...s,"byLocalId",i];if(!p(a)||a.properties!==void 0&&!p(a.properties)){this.report({code:"E_SHAPE",nodeId:r,message:"An override entry must be { properties: { \u2026 } }.",at:c});continue}if(!t)continue;let l=this.resolveOverrideTarget(t,i);if(l!==void 0){if(l===null){this.report({code:"E_UNKNOWN_OVERRIDE_TARGET",nodeId:r,message:`The prefab has no node at "${i}"; the loader warns and drops this override.`,fix:"override keys are node ids from the prefab root, joined with / for nested nodes",at:c});continue}this.checkInstanceProperties(l,p(a.properties)?a.properties:{},r,[...c,"properties"])}}}resolveOverrideTarget(e,t){let r=this.env.prefabs,s=r.localIdOf(e),o=r.effectiveDefinition(e);if(!s||!o)return;let i=t.replace(/\\/g,"/").replace(/^\/+/,"").trim(),a=[i.split("/")];if(i===s)return o;i.startsWith(`${s}/`)&&a.push(i.slice(s.length+1).split("/"));for(let c of a){let l=o;for(let d of c){let u=Array.isArray(l?.children)?l.children:[],f=null;for(let h of u){if(!p(h))continue;let g=r.localIdOf(h);if(g===null&&typeof h.instance=="string")return;if(g===d){f=r.effectiveDefinition(h);break}}if(l=f,!l)break}if(l)return l}return null}},ze=(n,e,t)=>{let r=Z(t);if("errors"in r)return{diagnostics:r.errors.map(o=>m({code:"E_YAML",file:e,line:o.line,message:`YAML does not parse: ${o.message}`})),references:new Set,parsed:null,usesUserComponents:!1};let s=new W(n,e,r);return s.run(),{diagnostics:s.diagnostics,references:s.references,parsed:r,usesUserComponents:s.usesUserComponents}},qe=(n,e,t,r,s,o,i,a)=>{let c=new W(n,e,t);return c.checkConfig(r,s,o,i,a),c.diagnostics};import{mkdtempSync as Wt,rmSync as Yt,writeFileSync as Ft}from"node:fs";import{tmpdir as Ut}from"node:os";import{join as Y}from"node:path";import{pathToFileURL as Vt}from"node:url";var Xe=()=>{let n={addColorStop:()=>{}};return new Proxy({},{get(e,t){return t==="measureText"?r=>({width:r.length*10,actualBoundingBoxAscent:10,actualBoundingBoxDescent:3,actualBoundingBoxLeft:0,actualBoundingBoxRight:r.length*10}):t==="getImageData"?()=>({data:new Uint8ClampedArray(4),width:1,height:1}):typeof t=="string"&&t.startsWith("create")?()=>n:()=>{}},set:()=>!0})},Tt=()=>({style:{},src:"",crossOrigin:null,complete:!1,width:0,height:0,addEventListener:()=>{},removeEventListener:()=>{}}),Je=()=>({createElement(n){if(n!=="canvas")throw new Error(`canvas-only document shim: createElement('${n}') is not provided`);return{width:1,height:1,style:{},getContext:e=>e==="2d"?Xe():null,addEventListener:()=>{},removeEventListener:()=>{}}},createElementNS(n,e){if(e!=="img")throw new Error(`canvas-only document shim: createElementNS('${e}') is not provided`);return Tt()}}),oe=()=>typeof Reflect.get(globalThis,"document")<"u"?()=>{}:(Reflect.set(globalThis,"document",Je()),()=>{Reflect.deleteProperty(globalThis,"document")});import{existsSync as Ze,readFileSync as Qe,statSync as At}from"node:fs";import{isAbsolute as Dt,join as It,relative as Ct,resolve as et}from"node:path";var A=class extends de{projectDir;transformText;constructor(e,t={}){super("/"),this.projectDir=et(e),this.transformText=t.transformText}pathOf(e){let t=this.normalize(e).replace(/^\/+/,"");return this.containedPath(t)}isProjectResource(e){let t=this.getScheme(e);return t===""||t==="res"}exists(e){let t=this.pathOf(e);if(!t||!Ze(t))return!1;try{return At(t).isFile()}catch{return!1}}async fetchText(e){let t=this.requirePath(e),r=Qe(t,"utf8");return this.transformText?this.transformText(r,t):r}async fetchBlob(e){return new Blob([new Uint8Array(Qe(this.requirePath(e)))])}containedPath(e){let t=decodeURIComponent(e.replace(/^\/+/,"")),r=et(It(this.projectDir,t)),s=Ct(this.projectDir,r);return s.startsWith("..")||Dt(s)?null:r}requirePath(e){let t=`res://${e.replace(/^\/+/,"")}`,r=this.containedPath(e);if(!r)throw new w(t,"resolves outside the project folder");if(!Ze(r))throw new w(t);return r}},w=class extends Error{resource;constructor(e,t="file not found"){super(`Missing resource ${e} (${t})`),this.name="MissingResourceError",this.resource=e}},$=class extends Error{resource;constructor(e){super(`Resource ${e} exists but is not decoded outside the browser`),this.name="ResourceNotDecodedError",this.resource=e}},D=class extends fe{missingSet=new Set;disk;constructor(e){super(e),this.disk=e}get missing(){return[...this.missingSet]}async loadTexture(e,t){return this.require(e),new pe}async loadAsset(e){throw this.require(e),new $(e)}async loadSpineAsset(e){throw this.require(e.skeletonPath),this.require(e.atlasPath),e.texturePath&&this.require(e.texturePath),new $(e.skeletonPath)}require(e){if(this.disk.isProjectResource(e)&&!this.disk.exists(e))throw this.missingSet.add(e),new w(e)}};var jt=[/^Lit is in dev mode/],Lt=n=>n instanceof Error?n.message:typeof n=="string"?n:String(n);async function ie(n){let e=[],t={warn:console.warn,debug:console.debug,info:console.info,log:console.log};console.warn=(...r)=>{let s=r.find(i=>i instanceof Error);if(s instanceof $)return;let o=r.map(Lt).join(" ");jt.some(i=>i.test(o))||e.push({message:o,error:s})},console.debug=()=>{},console.info=()=>{},console.log=()=>{};try{return{result:await n(),warnings:e}}finally{console.warn=t.warn,console.debug=t.debug,console.info=t.info,console.log=t.log}}var tt={runtime:"@pix3/runtime",three:"three"},Mt=async n=>{try{return await import(n)}catch{return null}},Gt=(n,e)=>({name:"pix3-validate-host-imports",setup(t){t.onResolve({filter:/^@pix3\/runtime$/},()=>({path:n.runtime,external:!0})),t.onResolve({filter:/^three$/},()=>({path:n.three,external:!0})),t.onResolve({filter:/\?(raw|url)$/},r=>{let[s,o]=r.path.split("?");return{path:Y(r.resolveDir,s),namespace:o==="raw"?"pix3-raw":"pix3-url"}}),t.onResolve({filter:/^[^./]/},r=>r.kind==="entry-point"?void 0:{path:r.path,namespace:"pix3-stub"}),t.onLoad({filter:/.*/,namespace:"pix3-stub"},()=>({contents:"module.exports = {};",loader:"js"})),t.onLoad({filter:/.*/,namespace:"pix3-raw"},async r=>{let{readFile:s}=await import("node:fs/promises");return{contents:`export default ${JSON.stringify(await s(r.path,"utf8"))};`,loader:"js"}}),t.onLoad({filter:/.*/,namespace:"pix3-url"},r=>({contents:`export default ${JSON.stringify(`res://${e.relativeOf(r.path)??r.path}`)};`,loader:"js"}))}}),rt=async(n,e,t,r,s="esbuild")=>{if(e.length===0)return{status:"none"};let o=await Mt(s);if(!o)return{status:"unavailable",reason:"esbuild is not installed (it is an optional dependency of @pix3/cli), so project scripts cannot be compiled"};let i;try{i=(await o.build({stdin:{contents:e.map((d,u)=>`export * as __pix3_entry_${u} from ${JSON.stringify(`./${d}`)};`).join(`
|
|
4
4
|
`),resolveDir:n.root,sourcefile:"pix3-validate-scripts.ts",loader:"ts"},absWorkingDir:n.root,bundle:!0,write:!1,format:"esm",platform:"neutral",target:"es2022",logLevel:"silent",loader:{".glsl":"text",".vert":"text",".frag":"text",".css":"empty"},define:{"import.meta.env.BASE_URL":JSON.stringify("/"),"import.meta.env.DEV":"true","import.meta.env.PROD":"false"},plugins:[Gt(r,n)]})).outputFiles[0]?.text??""}catch(l){let d=l.errors??[];return{status:"failed",diagnostics:(d.length>0?d:[{text:String(l),location:null}]).map(f=>m({code:"E_SCRIPT_COMPILE",file:f.location?.file?n.relativeOf(Y(n.root,f.location.file))??f.location.file:"scripts",line:f.location?.line,message:`Project scripts do not compile: ${f.text}. The editor registers none of them, so every user: component stays unregistered.`}))}}let a=Wt(Y(Ut(),"pix3-validate-")),c=Y(a,"scripts.mjs");try{Ft(c,i);let l=await import(Vt(c).href),d=[];return e.forEach((u,f)=>{let h=l[`__pix3_entry_${f}`];p(h)&&d.push(...Pe(t,h,u))}),{status:"loaded",registered:d}}catch(l){return{status:"failed",diagnostics:[m({code:"W_SCRIPT_IMPORT",file:"scripts",message:`The compiled project scripts threw when imported in Node (${l instanceof Error?l.message:String(l)}) \u2014 probably a browser global used at module top level. user: component properties not checked.`})]}}finally{Yt(a,{recursive:!0,force:!0})}},Bt=/Component type "(.*?)" is not registered yet — kept as pending on node "(.*?)"/,Ht=/Override target "(.*?)" not found/,nt=async n=>{let{env:e,registry:t,file:r}=n,s=[],o=new A(e.project.root),i=new ye(new D(o),t,o),a=oe();try{let{result:c,warnings:l}=await ie(()=>i.parseScene(n.text,{filePath:`res://${r}`}));for(let d of l){let u=Bt.exec(d.message);u?s.push(m({code:"E_PENDING_COMPONENT",file:r,nodeId:u[2],message:`Component ${u[1]} on node "${u[2]}" is still unregistered after compiling the project scripts; it never runs.`})):d.error instanceof w?s.push(m({code:"E_MISSING_RESOURCE",file:r,message:`${d.error.resource} does not exist (the loader warned: ${d.message.split(":")[0]}).`})):Ht.test(d.message)?s.push(m({code:"E_UNKNOWN_OVERRIDE_TARGET",file:r,message:`${d.message.replace(/^\[SceneLoader\]\s*/,"")} The override is dropped.`})):s.push(m({code:"E_LOAD",file:r,message:`The loader warned: ${d.message.replace(/^\[SceneLoader\]\s*/,"")}`}))}if(n.checkUserConfig&&Kt(n.parsed.data,(d,u,f,h)=>{if(!d.startsWith("user:"))return;let g=t.getComponentPropertySchema(d)?.properties;g&&s.push(...qe(e,r,n.parsed,d,g,u,f,h))}),!n.isPrefab)for(let d of Ee(c.rootNodes,{targetPlatform:n.targetPlatform}))d.code!=="inert-nodes"&&s.push(m({code:`W_RENDERABILITY_${d.code.toUpperCase().replace(/-/g,"_")}`,file:r,nodeId:d.nodeIds[0],message:d.message}))}catch(c){c instanceof me?s.push(m({code:"E_LOAD",file:r,message:`The loader rejects the scene: ${c.message}${c.details.length>0?` (${c.details.join("; ")})`:""}`})):c instanceof w?s.push(m({code:"E_MISSING_RESOURCE",file:r,message:`${c.resource} does not exist; the loader fails the whole scene.`})):s.push(m({code:"E_LOAD",file:r,message:`The loader threw ${c instanceof Error?`${c.name}: ${c.message}`:String(c)}.`}))}finally{a()}return s},Kt=(n,e)=>{let t=(r,s)=>{if(!p(r))return;let o=typeof r.id=="string"?r.id:void 0;Array.isArray(r.components)&&r.components.forEach((i,a)=>{p(i)&&typeof i.type=="string"&&e(i.type,p(i.config)?i.config:{},o,[...s,"components",a,"config"])}),Array.isArray(r.children)&&r.children.forEach((i,a)=>t(i,[...s,"children",a]))};p(n)&&Array.isArray(n.root)&&n.root.forEach((r,s)=>t(r,["root",s]))};var zt=n=>n.replace(/\/\*[\s\S]*?\*\//g," ").replace(/(^|[^:\\])\/\/.*$/gm,"$1"),qt=/\bexport\s+(default\s+)?(?:abstract\s+)?class\s+([A-Za-z_$][\w$]*)?/g,Xt=/\bexport\s+(?:const|let|var)\s+([A-Za-z_$][\w$]*)\s*=\s*class\b/g,Jt=/\bexport\s+(type\s+)?\{([^}]*)\}/g,Zt=/\bexport\s+\*\s+(?:as\s+[A-Za-z_$][\w$]*\s+)?from\b/,Qt=n=>{let e=zt(n),t=[];for(let r of e.matchAll(qt))t.push(r[1]?"default":r[2]??"default");for(let r of e.matchAll(Xt))t.push(r[1]);for(let r of e.matchAll(Jt))if(!r[1])for(let s of r[2].split(",")){let o=s.trim();if(!o||o.startsWith("type "))continue;let i=/\bas\s+([A-Za-z_$][\w$]*)$/.exec(o);t.push(i?i[1]:o.split(/\s+/)[0])}return{names:t,hasStar:Zt.test(e)}},st=n=>{let e=new Map,t=[],r=[];for(let s of n.files){if(!(s.endsWith(".ts")||s.endsWith(".js"))||s.endsWith(".d.ts"))continue;let o;try{o=n.readText(s)}catch{continue}if(!we(s,o))continue;t.push(s);let{names:i,hasStar:a}=Qt(o);a&&r.push(s);for(let c of i){let l=`${_e}${c}`;e.has(l)||e.set(l,s)}}return{ids:e,entries:t,opaqueEntries:r}};var ae="(user: component properties not checked)",ot=[".pix3scene",".ts",".js",".json",".pix3anim",".atlas",".yaml",".yml",".html",".css"],er=["sprites/","audio/"],tr=(n,e)=>{let t=n.files.filter(s=>ot.some(o=>s.endsWith(o))).map(s=>{try{return{file:s,text:n.readText(s)}}catch{return{file:s,text:""}}}),r=[];for(let s of n.files){if(!er.some(c=>s.startsWith(c)))continue;let o=s.slice(s.lastIndexOf("/")+1);if(o.startsWith(".")||ot.some(c=>s.endsWith(c))||e.has(s))continue;let i=s.slice(0,s.lastIndexOf("/")+1);t.some(({file:c,text:l})=>c!==s&&(l.includes(s)||c.startsWith(i)&&c.slice(i.length).indexOf("/")===-1&&l.includes(o)))||r.push(m({code:"W_UNUSED_ASSET",file:s,message:`${s} is not referenced by any scene, script or resource file.`,fix:"use it, or delete it to keep exports small"}))}return r},F=async n=>{let e=new k(n.projectRoot),t=new ue,r=console.log;console.log=()=>{};try{Re(t)}finally{console.log=r}let s={project:e,registry:t,userScripts:st(e),prefabs:new L(e)},o=n.files===void 0,i=[...n.files??e.scenes()].sort(),a=[],c=[],l=new Map,d=new Map;for(let g of i){if(!e.has(g)){a.push(m({code:"E_SHAPE",file:g,message:`${g} does not exist.`}));continue}let E=e.readText(g);d.set(g,E),c.push({file:g,sha256:je(e,g)});let x=ze(s,g,E);l.set(g,x),a.push(...x.diagnostics)}if(o){let g=new Set;for(let E of l.values())for(let x of E.references)g.add(x);a.push(...tr(e,g))}let u=[...l.values()].some(g=>g.usesUserComponents),f=[],h;if(n.hydrate===!1)h={state:"disabled"},u&&f.push(`Level 2 disabled (--no-hydrate) ${ae}.`);else{let g=i.filter(P=>{let R=l.get(P);return R?.parsed&&!R.diagnostics.some(dt=>dt.severity==="error")}),E=await rt(e,s.userScripts.entries,t,n.scriptImports??tt,n.esbuildSpecifier),x=!0,I=!1;E.status==="unavailable"?(x=!1,I=!0,a.push(m({code:"W_HYDRATE_SKIPPED",file:"scripts",message:`Level 2 skipped for scenes with user: components: ${E.reason} ${ae}.`,fix:"npm install esbuild next to @pix3/cli, or run with --no-hydrate"}))):E.status==="failed"&&(x=!1,I=!0,a.push(...E.diagnostics));let le=new Set;for(let P of e.scenes())for(let R of s.prefabs.instanceTargets(P))le.add(R);let{targetPlatform:lt}=Le(e),N=0,O=0;for(let P of g){let R=l.get(P);if(R?.parsed){if(I&&R.usesUserComponents){O+=1;continue}a.push(...await nt({env:s,registry:t,file:P,text:d.get(P)??"",parsed:R.parsed,targetPlatform:lt,isPrefab:le.has(P),checkUserConfig:x})),N+=1}}h={state:"ran",filesHydrated:N,filesSkipped:i.length-N,...O>0?{filesSkippedForScripts:O}:{}},i.length-N>0&&f.push(`Level 2 did not hydrate ${i.length-N} of ${i.length} file(s): it runs only on files with no level-1 errors${I?" and, while scripts cannot be loaded, without user: components":""}.`),E.status==="failed"&&O>0&&f.push(`SKIPPED: ${O} scene(s) with user: components were not checked at level 2 because the project scripts do not compile (E_SCRIPT_COMPILE above) \u2014 E_UNKNOWN_CONFIG_KEY, E_PROPERTY_TYPE and every other user: component check are missing from this report, not passed. Fix the compile error and run again.`),!x&&u&&f.push(`Project scripts could not be loaded ${ae}.`)}return a.sort(Ne),{projectRoot:e.root,files:c,diagnostics:a,errorCount:a.filter(g=>g.severity==="error").length,warningCount:a.filter(g=>g.severity==="warning").length,level2:h,notes:f}};var it=`Usage: pix3 validate [paths\u2026] [--json] [--no-hydrate] [--project <dir>]
|
|
5
5
|
|