@pix3/cli 1.6.4 → 2.0.0-alpha.0
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/LICENSE +201 -201
- package/README.md +722 -788
- package/dist/index.js +557 -421
- package/dist/runtime-types.json +1 -1
- package/dist/smoke/prebuilt/{build-7MIXIMSZ.mjs → build-7REMSA2S.mjs} +52 -52
- package/dist/smoke/prebuilt/chunk-4DGG2BKR.mjs +2 -0
- package/dist/smoke/prebuilt/chunk-YLBMUJ2H.mjs +238 -0
- package/dist/smoke/prebuilt/runtime.mjs +1 -1
- package/dist/smoke/prebuilt/smoke-worker.mjs +211 -2
- package/dist/smoke/prebuilt/tree-defaults.mjs +1 -1
- package/dist/validate/prebuilt/{build-AUGKXER3.js → build-ADF5EEE2.js} +52 -52
- package/dist/validate/prebuilt/bundle-main.js +223 -18
- package/dist/validate/prebuilt/chunk-VIHIF4G2.js +238 -0
- package/dist/validate/prebuilt/runtime.js +1 -1
- package/kit/files/.claude/skills/pix3-editor/SKILL.md +200 -0
- package/kit/files/.claude/skills/pix3-nodes/SKILL.md +13 -15
- package/kit/files/.claude/skills/pix3-nodes/reference.md +77 -71
- package/kit/files/.claude/skills/pix3-scene-format/SKILL.md +38 -41
- package/kit/files/.claude/skills/pix3-scene-format/pix3anim.md +185 -0
- package/kit/files/.claude/skills/pix3-scene-format/project-files.md +244 -0
- package/kit/files/.claude/skills/pix3-scene-format/reference.md +28 -16
- package/kit/files/.claude/skills/pix3-scripts/SKILL.md +34 -24
- package/kit/files/.claude/skills/pix3-scripts/reference.md +68 -141
- package/kit/files/.claude/skills/pix3-verify/SKILL.md +65 -326
- package/kit/files/.claude/skills/pix3-verify/reference.md +2 -14
- package/kit/files/AGENTS.md +76 -84
- package/kit/files/design/tests/bots/pix3-test-bot.d.ts +89 -0
- package/kit/kit.json +8 -5
- package/package.json +62 -54
- package/templates/2d/files/scenes/main.pix3scene +31 -0
- package/templates/2d/template.yaml +11 -0
- package/templates/3d/files/scenes/main.pix3scene +50 -0
- package/templates/3d/template.yaml +11 -0
- package/templates/base/files/README.md +39 -0
- package/templates/base/files/gitignore +11 -0
- package/templates/base/files/index.html +23 -0
- package/templates/base/files/package.json +28 -0
- package/templates/base/files/src/main.ts +3 -0
- package/templates/base/files/tsconfig.json +17 -0
- package/templates/base/files/vite.config.ts +10 -0
- package/dist/smoke/prebuilt/chunk-CBFYKDS7.mjs +0 -2
- package/dist/smoke/prebuilt/chunk-VJHJ5BCO.mjs +0 -239
- package/dist/validate/prebuilt/chunk-CFQFEI52.js +0 -239
- package/templates/empty-2d/files/README.md +0 -20
- package/templates/empty-2d/files/scenes/main.pix3scene +0 -68
- package/templates/empty-2d/files/sprites/pix3-logo.png +0 -0
- package/templates/empty-2d/template.yaml +0 -7
- package/templates/empty-3d/files/README.md +0 -20
- package/templates/empty-3d/files/scenes/main.pix3scene +0 -108
- package/templates/empty-3d/files/sprites/pix3-logo.png +0 -0
- package/templates/empty-3d/template.yaml +0 -7
- package/templates/idea-blank/files/README.md +0 -22
- package/templates/idea-blank/files/scenes/main.pix3scene +0 -37
- package/templates/idea-blank/template.yaml +0 -10
- package/templates/minigame-2d/files/README.md +0 -44
- package/templates/minigame-2d/files/design/tests/reachability.json +0 -1
- package/templates/minigame-2d/files/design/tests/routines/mute-music.json +0 -44
- package/templates/minigame-2d/files/scenes/main.pix3scene +0 -84
- package/templates/minigame-2d/files/scenes/menu.pix3scene +0 -118
- package/templates/minigame-2d/files/scenes/ui/settings-window.pix3scene +0 -138
- package/templates/minigame-2d/files/scripts/GameFlow.ts +0 -133
- package/templates/minigame-2d/files/scripts/MenuFlow.ts +0 -217
- package/templates/minigame-2d/files/scripts/SettingsWindow.ts +0 -198
- package/templates/minigame-2d/template.yaml +0 -10
- package/templates/playable-2d/files/README.md +0 -30
- package/templates/playable-2d/files/design/recipe.md +0 -83
- package/templates/playable-2d/files/design/tests/reachability.json +0 -4
- package/templates/playable-2d/files/design/tests/routines/intro-to-cta.json +0 -32
- package/templates/playable-2d/files/scenes/main.pix3scene +0 -111
- package/templates/playable-2d/files/scenes/ui/end-screen.pix3scene +0 -91
- package/templates/playable-2d/files/scenes/ui/intro.pix3scene +0 -65
- package/templates/playable-2d/files/scripts/CtaButton.ts +0 -55
- package/templates/playable-2d/files/scripts/GameFlow.ts +0 -256
- package/templates/playable-2d/files/sprites/pix3-logo.png +0 -0
- package/templates/playable-2d/template.yaml +0 -9
- package/templates/playable-3d/files/README.md +0 -32
- package/templates/playable-3d/files/design/recipe.md +0 -127
- package/templates/playable-3d/files/design/tests/reachability.json +0 -4
- package/templates/playable-3d/files/design/tests/routines/intro-to-cta.json +0 -32
- package/templates/playable-3d/files/scenes/main.pix3scene +0 -230
- package/templates/playable-3d/files/scenes/ui/end-screen.pix3scene +0 -91
- package/templates/playable-3d/files/scenes/ui/intro.pix3scene +0 -65
- package/templates/playable-3d/files/scripts/CtaButton.ts +0 -55
- package/templates/playable-3d/files/scripts/GameFlow.ts +0 -309
- package/templates/playable-3d/files/scripts/GameRules.ts +0 -290
- package/templates/playable-3d/files/scripts/ScoreHud.ts +0 -113
- package/templates/playable-3d/template.yaml +0 -9
- package/templates/recipe-arena-2d/files/README.md +0 -48
- package/templates/recipe-arena-2d/files/design/recipe.md +0 -127
- package/templates/recipe-arena-2d/files/design/tests/reachability.json +0 -4
- package/templates/recipe-arena-2d/files/design/tests/routines/terminal-retry.json +0 -23
- package/templates/recipe-arena-2d/files/scenes/main.pix3scene +0 -292
- package/templates/recipe-arena-2d/files/scenes/menu.pix3scene +0 -100
- package/templates/recipe-arena-2d/files/scenes/prefabs/hazard.pix3scene +0 -42
- package/templates/recipe-arena-2d/files/scenes/prefabs/pickup.pix3scene +0 -45
- package/templates/recipe-arena-2d/files/scenes/ui/result.pix3scene +0 -85
- package/templates/recipe-arena-2d/files/scripts/GameRules.ts +0 -368
- package/templates/recipe-arena-2d/files/scripts/MenuFlow.ts +0 -106
- package/templates/recipe-arena-2d/files/scripts/PlayerController.ts +0 -151
- package/templates/recipe-arena-2d/files/scripts/ScoreHud.ts +0 -94
- package/templates/recipe-arena-2d/files/scripts/Spawner.ts +0 -214
- package/templates/recipe-arena-2d/files/scripts/TouchRules.ts +0 -174
- package/templates/recipe-arena-2d/files/sprites/ph-avatar.png +0 -0
- package/templates/recipe-arena-2d/files/sprites/ph-hazard.png +0 -0
- package/templates/recipe-arena-2d/files/sprites/ph-pickup.png +0 -0
- package/templates/recipe-arena-2d/template.yaml +0 -10
- package/templates/recipe-blank-2d/files/README.md +0 -61
- package/templates/recipe-blank-2d/files/design/recipe.md +0 -148
- package/templates/recipe-blank-2d/files/design/tests/reachability.json +0 -4
- package/templates/recipe-blank-2d/files/design/tests/routines/restart.json +0 -27
- package/templates/recipe-blank-2d/files/design/tests/routines/terminal-retry.json +0 -23
- package/templates/recipe-blank-2d/files/scenes/main.pix3scene +0 -224
- package/templates/recipe-blank-2d/files/scenes/ui/result.pix3scene +0 -85
- package/templates/recipe-blank-2d/files/scripts/GameRules.ts +0 -350
- package/templates/recipe-blank-2d/files/scripts/ScoreHud.ts +0 -110
- package/templates/recipe-blank-2d/files/sprites/ph-bg.png +0 -0
- package/templates/recipe-blank-2d/files/sprites/ph-capsule.png +0 -0
- package/templates/recipe-blank-2d/files/sprites/ph-circle.png +0 -0
- package/templates/recipe-blank-2d/files/sprites/ph-orb.png +0 -0
- package/templates/recipe-blank-2d/files/sprites/ph-ring.png +0 -0
- package/templates/recipe-blank-2d/files/sprites/ph-star.png +0 -0
- package/templates/recipe-blank-2d/template.yaml +0 -10
- package/templates/recipe-bouncer-2d/files/README.md +0 -81
- package/templates/recipe-bouncer-2d/files/design/recipe.md +0 -146
- package/templates/recipe-bouncer-2d/files/design/tests/reachability.json +0 -4
- package/templates/recipe-bouncer-2d/files/design/tests/routines/terminal-retry.json +0 -23
- package/templates/recipe-bouncer-2d/files/scenes/main.pix3scene +0 -615
- package/templates/recipe-bouncer-2d/files/scenes/menu.pix3scene +0 -191
- package/templates/recipe-bouncer-2d/files/scenes/ui/result.pix3scene +0 -87
- package/templates/recipe-bouncer-2d/files/scripts/BallBody.ts +0 -298
- package/templates/recipe-bouncer-2d/files/scripts/GameRules.ts +0 -377
- package/templates/recipe-bouncer-2d/files/scripts/MenuFlow.ts +0 -109
- package/templates/recipe-bouncer-2d/files/scripts/PaddleController.ts +0 -112
- package/templates/recipe-bouncer-2d/files/scripts/ScoreHud.ts +0 -94
- package/templates/recipe-bouncer-2d/files/scripts/TouchRules.ts +0 -263
- package/templates/recipe-bouncer-2d/files/scripts/ball-collision.ts +0 -307
- package/templates/recipe-bouncer-2d/files/sprites/ph-ball.png +0 -0
- package/templates/recipe-bouncer-2d/files/sprites/ph-bg.png +0 -0
- package/templates/recipe-bouncer-2d/files/sprites/ph-bumper.png +0 -0
- package/templates/recipe-bouncer-2d/files/sprites/ph-paddle.png +0 -0
- package/templates/recipe-bouncer-2d/template.yaml +0 -10
- package/templates/recipe-grid-3d/files/README.md +0 -22
- package/templates/recipe-grid-3d/files/design/recipe.md +0 -110
- package/templates/recipe-grid-3d/files/scenes/main.pix3scene +0 -169
- package/templates/recipe-grid-3d/files/scenes/menu.pix3scene +0 -100
- package/templates/recipe-grid-3d/files/scenes/ui/result.pix3scene +0 -105
- package/templates/recipe-grid-3d/files/scripts/GridBoard.ts +0 -319
- package/templates/recipe-grid-3d/files/scripts/GridRules.ts +0 -278
- package/templates/recipe-grid-3d/files/scripts/MenuFlow.ts +0 -106
- package/templates/recipe-grid-3d/files/scripts/ScoreHud.ts +0 -94
- package/templates/recipe-grid-3d/template.yaml +0 -10
- package/templates/recipe-tapper-2d/files/README.md +0 -39
- package/templates/recipe-tapper-2d/files/design/recipe.md +0 -132
- package/templates/recipe-tapper-2d/files/design/tests/reachability.json +0 -4
- package/templates/recipe-tapper-2d/files/design/tests/routines/terminal-retry.json +0 -23
- package/templates/recipe-tapper-2d/files/scenes/main.pix3scene +0 -269
- package/templates/recipe-tapper-2d/files/scenes/menu.pix3scene +0 -100
- package/templates/recipe-tapper-2d/files/scenes/prefabs/hazard.pix3scene +0 -42
- package/templates/recipe-tapper-2d/files/scenes/prefabs/target.pix3scene +0 -45
- package/templates/recipe-tapper-2d/files/scenes/ui/result.pix3scene +0 -85
- package/templates/recipe-tapper-2d/files/scripts/GameRules.ts +0 -368
- package/templates/recipe-tapper-2d/files/scripts/MenuFlow.ts +0 -106
- package/templates/recipe-tapper-2d/files/scripts/ScoreHud.ts +0 -94
- package/templates/recipe-tapper-2d/files/scripts/Spawner.ts +0 -214
- package/templates/recipe-tapper-2d/files/scripts/TouchRules.ts +0 -192
- package/templates/recipe-tapper-2d/files/sprites/ph-hazard.png +0 -0
- package/templates/recipe-tapper-2d/files/sprites/ph-target.png +0 -0
- package/templates/recipe-tapper-2d/template.yaml +0 -10
|
@@ -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-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};
|
|
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,Ca as Do,Cb as Cr,Cc as Ce,Cd as Df,Ce as Dm,Cf as Dp,D,Da as Eo,Db as Dr,Dc as De,Dd as Ef,De as Em,Df as Ep,E,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,Uf as Vp,V,Va as Vo,Vb as Vr,Vc as Ve,Vd as Wf,Ve as Wm,Vf as Wp,W,Wa as Wo,Wb as Wr,Wc as We,Wd as Xf,We as Xm,Wf as Xp,X,Xa as Xo,Xb as Xr,Xc as Xe,Xd as Yf,Xe as Ym,Xf as Yp,Y,Ya as Yo,Yb as Yr,Yc as Ye,Yd as Zf,Ye as Zm,Yf as Zp,Z,Za as Zo,Zb as Zr,Zc as Ze,Zd as _f,Ze as _m,Zf as _p,_,_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-YLBMUJ2H.mjs";import"./chunk-P2CBRXPJ.mjs";export{Ne as AO_MODES,Bp as ATLAS_MANIFEST_PATH,oo as ATLAS_REGION_KEY,Cp as ATLAS_SHEET_DIR,$ as ATLAS_SHEET_SCHEME,ro as ATLAS_SIZE_KEY,ko as AUDIO_BUS_NAMES,Kr as AmbientLightNode,kr as AnimatedSprite2D,Tr as AnimatedSprite3D,tp as AnimationPlayerBehavior,jo as AssetLoader,Nm as AudioApi,ze as AudioPlayer,lo as AudioService,tr as BATCHABLE_2D_KEY,Lo as BLEND_MODES_2D,Mo as BLEND_MODE_2D_OPTIONS,Yo as BUILTIN_SHADER_EFFECTS,Cm as BURST_MAX_PARTICLES,de as Bar2D,xr as Batch2DSystem,Mp as BurstOnSignalBehavior,be as Button2D,Dr as CAMERA2D_DEFAULTS,Up as CHARACTER_STATE_FINISHED_SIGNAL,Xf as CONTACT_MARGIN,Ze as CURRENT_SCENE_FORMAT_VERSION,Er as Camera2D,He as Camera3D,xp as CameraBrainBehavior,Gr as CanvasLayer2D,Vp as CharacterVisual2DBehavior,ge as Checkbox2D,Rp as Collider2DBehavior,Wf as Collision2DService,qr as ColorRect2D,ap as CutsceneApi,_m as DEFAULT_CLIP_DURATION,lp as DEFAULT_FIXED_DELTA_SEC,Be as DEFAULT_GEOMETRY_MATERIAL_TYPE,qp as DEFAULT_RUNTIME_TIME_CONFIG,k as DIRECTION_AXES_ENABLED_KEY,Hr as DirectionalLightNode,Ie as EASING_NAMES,ip as ECSService,pf as EMOJI_GUARDED_TEXT_PROPERTIES,Ip as FadeBehavior,Em as FloatText2D,r as GAME_DEBUG_GLOBAL_KEY,Ce as GEOMETRY_KINDS,Ae as GEOMETRY_MATERIAL_TYPES,zm as GameCommandRegistry,ym as GameTime,De as GeometryMesh,Ar as Group2D,Rr as HemisphereLightNode,Pp as Hitbox2DBehavior,mf as INSTANCE_TRANSFORM_KEYS,wf as InputService,Ee as InstancedMesh3D,he as InventorySlot2D,Zr as Joystick2D,Hm as JuiceApi,Lr as KNOWN_SCENE_NODE_TYPES,le as LABEL_AUTO_SIZE_BLEED,ne as LABEL_GLOW_STRENGTH_LIMIT,ie as LABEL_H_ALIGN_VALUES,ke as LABEL_LINE_HEIGHT_FACTOR,je as LABEL_V_ALIGN_VALUES,ye as Label2D,bp as LocalizationService,em as MAX_NET_KIND,zf as MAX_POLYGON_VERTICES,np as MAX_TICKS_PER_FRAME,Zm as MIN_CLIP_DURATION,yf as MIN_POLYGON_VERTICES,L as MeshInstance,gm as NET_APP_FLAGS_SHIFT,dm as NET_OWNERSHIP_MASK,Qo as NODE2D_MARGIN_SIDES,fm as NetKindTable,qm as NetRoomVars,lm as NetworkConnectError,wm as NetworkNodeBinder,sm as NetworkService,km as NetworkSpawnError,Wp as NetworkedNodeBehavior,So as Node2D,G as Node3D,F as NodeBase,me as OVERLAY_2D_FLAG,h as PHYSICS_DEBUG_ENABLED_KEY,c as PHYSICS_DEBUG_GLOBAL_KEY,Re as POST_PROCESS_DEFAULTS,Oe as PROJECT_AO_MODES,bf as PROJECT_SCRIPT_DIRECTORIES,cf as PROJECT_SCRIPT_EXCLUDE_PATTERN,S as PROJECT_TEXTURE_FILTERING_MODES,Dm as ParticleBurst2D,Ur as Particles3D,om as Physics2DService,Qp as PhysicsBody2DBehavior,Sp as PhysicsWorld2DBehavior,Hp as PinToNodeBehavior,Kp as PlaySoundBehavior,Ir as PointLightNode,Bm as PopInBehavior,Se as PostProcess,gp as PostProcessingPipeline,Am as PunchScaleBehavior,x as RUNTIME_PROPERTY_SINK_GLOBAL_KEY,m as RUNTIME_SCENE_GLOBAL_KEY,Jp as RadialProgressBehavior,rm as RejectCode,Xp as ReplicatedTransformBehavior,o as ResourceManager,Tp as RevoluteJoint2DBehavior,Ep as RotateBehavior,zp as RuntimeRenderer,of as SCENE_COMPONENT_DEFINITION_KEYS,rf as SCENE_DISK_FORMAT_TYPES,_e as SCENE_DOCUMENT_KEYS,$e as SCENE_NODE_DEFINITION_KEYS,u as SCRIPT_ERROR_SINK_GLOBAL_KEY,xe as SEMANTIC_POINTER_ID,Jm as SFX_PRESETS,E as SHARED_UNIT_QUAD_GEOMETRY,y as SIGNAL_EMIT_SINK_GLOBAL_KEY,We as SceneLoader,vf as SceneManager,yp as SceneRunner,uf as SceneSaver,cp as SceneService,Ve as SceneValidationError,qo as Script,no as ScriptRegistry,te as ScrollContainer2D,Lp as SfxOnSignalBehavior,Mm as SfxSynth,fr as ShaderEffectStack,Br as ShakeBehavior,Fp as SimpleMoveBehavior,Gp as SineBehavior,ce as Slider2D,nr as SpineSkeleton2D,lr as SpineSkeletonView,Jr as SpotLightNode,dr as Sprite2D,Sr as Sprite3D,Fe as TARGET_DISTANCE,q as TEST_COMPONENT_TYPE_PREFIX,Fm as TRAIL_MAX_POINTS,zr as TiledSprite2D,Gm as Trail2D,Im as TweenApi,ae as UIControl2D,gf as USER_SCRIPT_ID_PREFIX,Le as VIRTUAL_CAMERA_DEFAULTS,Me as VirtualCamera3D,bm as WS_CLOSE_NORMAL,am as WS_CLOSE_PROTOCOL_VIOLATION,cm as WsTransport,ur as ZERO_SLICE_BORDER,Ro as Z_INDEX_LIMIT,Ge as aimCameraNodeAt,Te as aoModeUsesSSAO,Po as applyBlendMode2DToMaterial,Ym as applyClipAtTime,Ke as applyEasing,hp as applyLocaleToTree,ee as applyTextStyle,Y as applyTextureRegionToTexture,pe as assign2DRenderOrder,K as assignWithoutSchemaRefresh,fo as atlasSizeOf,Ao as attachComponentDefinitions,qf as autoloadComponentType,eo as baseRegionOf,Oo as blendingForMode2D,Jf as boxPolygon,yr as buildSkinGeometry,sr as buildTiledSpriteGeometry,Lf as capsulePolygon,Of as circleIntersectsPolygon,Kf as circlePolygon,Lm as clampSfxPitch,Ff as cleanPolygon,rp as coerceKeyframeValue,pr as coerceTextureResource,Uo as coerceToPropertyType,Rm as collectAudioKeysInRange,P as collectClipPointNames,Eo as collectComponentDefinitions,Sm as collectEventKeysInRange,Xe as collectRenderabilityIssues,Qm as collectTimedKeysInRange,Zf as collideCirclePolygon,Yf as collideCircles,_f as collidePolygons,or as composeEffectShaders,Z as composeTextureRegion,W as configure2DTexture,Gf as convexHull,Rf as convexPolygonsIntersect,po as copyAtlasMetadata,to as createAtlasResolver,Xm as createClipBindings,mp as createDefaultClip,fp as createEmptyAnimationSet,oe as cssFont,_r as cssFontFamily,$r as cssFontWeight,vm as decodeSignalPayload,Tf as decomposeConvex,Vo as defineGroup,To as defineProperty,af as describeEmojiAsArt,uo as describeFontFace,nm as describeRejectCode,D as describeThrown,Qr as describeUnknownNodeType,Nf as distanceToPolygonBoundary,re as drawStyledText,Xo as effectSupportsTarget,um as encodeSignalPayload,Ef as ensureCounterClockwise,Fr as findActiveCamera2D,R as findAnimationClip,O as findAnimationFramePoint,pp as findKeyframeClip,Tm as fireEventKey,Vm as fromSchemaValue,op as generateTrackId,br as getActiveLocalization,$o as getAllShaderEffectTypes,M as getAnimationFrameTexturePath,zo as getComponentSchemaProperties,f as getGameDebug,mm as getNetKindTable,Fo as getNodePropertySchema,g as getPhysicsDebugSource,Qe as getProjectAODefault,V as getProjectTextureFiltering,Go as getPropertiesByGroup,Ho as getPropertyDefinition,Io as getPropertyDisplayValue,b as getRuntimeLivePropertySink,t as getRuntimeSceneRoot,ef as getSceneNodeDiskFormat,w as getScriptErrorSink,_o as getShaderEffectType,A as getSignalEmitSink,Dp as installAtlasFromManifest,I as installReactiveSchemaProperties,Om as interpolateValue,n as isDirectionAxesEnabled,tf as isEmojiOnlyText,wo as isFontFaceRegistered,Ue as isHighEndDevice,Ye as isInertNode,Vr as isInteractive,Je as isKeyframeEasing,Or as isKnownSceneNodeType,jm as isNetTeleport,j as isPhysicsDebugEnabled,Df as isPolygonConvex,kf as isProjectScriptEntry,jf as isProjectScriptPath,_ as isSameTextureRegion,so as isScriptComponent,lf as isScriptComponentClass,N as isSequenceAnimationFrame,Km as isSfxPreset,er as isShaderEffectHost,wr as isSliceBorderEmpty,ao as isSpineModuleAvailable,Co as isStaleComponent,s as isTestHarnessComponentType,xf as isTextProperty,mr as isTextureResourceRef,$m as isTrackValueType,ue as labelDecorationPadding,qe as labelGlowBlurPx,se as labelGlowPasses,ve as layoutLabelText,yo as loadProjectFonts,io as loadSpineAsset,bo as loadSpineModule,H as makeSchemaPropertyReactive,Wo as mergeSchemas,im as netFlagsByte,hm as netOwnershipOf,Q as normalizeAnimationResource,sf as normalizeAutoloads,No as normalizeBlendMode2D,ep as normalizeKeyframeAnimationSet,Mr as normalizeNodeTypeName,Np as normalizePolygonConfig,T as normalizeProjectTextureFiltering,vr as normalizeSliceBorder,we as paintLabelCanvas,gr as parseEventArgs,ho as parseSpineAtlasPageNames,wp as playable,Mf as pointInPolygon,Bf as polygonArea,Hf as polygonBounds,Cf as polygonCentroid,Af as polygonSignedArea,df as projectScriptGlobPatterns,Zp as property,Vf as quaternionToRotationZ,J as reactiveSchemaPropertyNames,Xr as readBooleanArg,Wr as readNumberArg,Yr as readStringArg,Uf as readWorldTransform2D,Qf as rectIntersectsConvexPolygon,Pf as rectIntersectsPolygon,Yp as registerBuiltInScripts,e as registerGameDebug,tm as registerNetworkPrefab,d as registerPhysicsDebugSource,nf as registerProjectScriptExports,a as registerRuntimeLivePropertySink,p as registerRuntimeSceneRoot,v as registerScriptErrorSink,Zo as registerShaderEffect,z as registerSignalEmitSink,Do as replaceStaleComponents,C as reportScriptError,B as reportSignalEmit,xm as resetNetKindTable,vo as resetProjectFontRegistry,hr as resolveAnimatedSpriteFrameLayout,ir as resolveFramePointToLocal,jr as resolveFramePolygonToLocal,cr as resolveLocalizedText,Bo as resolvePendingComponents,sp as resolveRuntimeTimeConfig,ff as resolveSceneDiskKey,Nr as resolveSceneNodeType,go as resolveSpinePagePath,Wm as resolveTrackTarget,Pm as sampleTrack,X as sanitizeTextureRegion,Ap as scanScriptLocalizationKeys,Sf as segmentPolygonT,Op as serializePolygonConfig,ar as setActiveLocalization,vp as setDefaultStoreUrl,l as setDirectionAxesEnabled,pm as setNetworkPrefabTable,Ko as setNodePropertyValue,i as setPhysicsDebugEnabled,up as setPlayableAdapter,dp as setPostprocessingModuleLoader,Pe as setProjectAODefault,U as setProjectTextureFiltering,xo as setSpineModuleLoader,rr as shaderEffectsCacheKey,Cr as shakeNoise,co as spineAssetKey,mo as stampAtlasView,_p as state,fe as styledTextPadding,Pr as suggestSceneNodeType,$f as sweepCircleAgainstPolygon,Um as toSchemaValue,If as transformPolygon,hf as userScriptComponentId,Jo as validatePropertyValue,jp as worldToCanvasLogical,kp as worldToCanvasThroughCamera};
|
|
@@ -1,3 +1,212 @@
|
|
|
1
1
|
import { createRequire as __pix3CreateRequire } from 'node:module'; const require = __pix3CreateRequire(import.meta.url);
|
|
2
|
-
import{a as
|
|
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);
|
|
2
|
+
import{a as Oe,c as Z,d as Q,e as $e,f as ee}from"./chunk-4DGG2BKR.mjs";import{D as T,Ea as H,F as Ee,Vc as J,Wc as X,Xf as Ne,d as ge,kf as Pe,md as be,pd as we,qa as Se,ra as xe,rd as ve,td as ke,vd as _e,w as ye,xf as Re}from"./chunk-YLBMUJ2H.mjs";import{d as Y}from"./chunk-P2CBRXPJ.mjs";import{parentPort as Gt,workerData as Bt}from"node:worker_threads";var Ae=["coin","jump","hit","explosion","powerup","click"],j={wave:"square",freq:440,freqEnd:440,slide:0,arpAt:0,arpMul:1,vibratoDepth:0,vibratoHz:0,duty:.5,attack:.002,decay:.05,sustainLevel:.6,sustain:.05,release:.1,lowpassHz:0,lowpassQ:.707,volume:.8},Jt={coin:{...j,freq:988,freqEnd:988,arpAt:.07,arpMul:4/3,duty:.5,decay:.02,sustainLevel:.7,sustain:.1,release:.18,volume:.7},jump:{...j,freq:260,freqEnd:720,slide:.16,duty:.35,decay:.04,sustainLevel:.6,sustain:.06,release:.1,lowpassHz:5e3,volume:.7},hit:{...j,wave:"noise",freq:1400,freqEnd:180,slide:.12,attack:.001,decay:.05,sustainLevel:.3,sustain:.02,release:.08,lowpassHz:3200,lowpassQ:1.2,volume:.85},explosion:{...j,wave:"noise",freq:520,freqEnd:40,slide:.7,attack:.002,decay:.12,sustainLevel:.55,sustain:.15,release:.5,lowpassHz:1400,lowpassQ:1,volume:.9},powerup:{...j,wave:"saw",freq:330,freqEnd:1320,slide:.38,vibratoDepth:.04,vibratoHz:14,attack:.005,decay:.05,sustainLevel:.7,sustain:.25,release:.15,lowpassHz:6e3,volume:.65},click:{...j,wave:"square",freq:1800,freqEnd:1200,slide:.02,duty:.25,attack:5e-4,decay:.012,sustainLevel:0,sustain:0,release:.012,lowpassHz:8e3,volume:.6}};import{readFileSync as ct}from"node:fs";import{join as lt}from"node:path";import{existsSync as rt,mkdtempSync as Qt,readFileSync as nt,rmSync as er}from"node:fs";import{dirname as te,join as st}from"node:path";import{fileURLToPath as ot}from"node:url";var it="@pix3/cli",at=t=>{try{return JSON.parse(nt(t,"utf8")).name===it}catch{return!1}},V,Le=()=>{if(V!==void 0)return V;let t=te(ot(import.meta.url)),e=t;for(;;){let s=st(e,"package.json");if(rt(s)&&at(s))return V=e;let n=te(e);if(n===e)break;e=n}return V=te(t)};var dt=()=>{try{let t=ct(lt(Le(),"package.json"),"utf8"),e=JSON.parse(t);return typeof e.version=="string"?e.version:"0.0.0"}catch{return"0.0.0"}},Te=dt();var dr=`pix3 ${Te}
|
|
3
|
+
|
|
4
|
+
Usage:
|
|
5
|
+
pix3 new List the starters (2d, 3d)
|
|
6
|
+
pix3 new <2d|3d> [dir] Create an empty project (dir defaults to pix3-<2d|3d>)
|
|
7
|
+
[--name <project name>]
|
|
8
|
+
pix3 editor [--project <dir>] Find (or start, detached) the project's Vite dev server
|
|
9
|
+
[--stop] [--chrome-only] from .pix3/dev.json and open the editor in Chrome, its
|
|
10
|
+
[--no-chrome] [--port <n>] CDP behind the token proxy ws://127.0.0.1:9333/pix3 (next
|
|
11
|
+
[--cdp-port <n>] free port when taken); --stop-chrome ends that Chrome.
|
|
12
|
+
[--headless] [--stop-chrome] Over SSH: prints what to run on your machine instead;
|
|
13
|
+
[--url <editor url>] there, --url opens a forwarded remote editor (no project)
|
|
14
|
+
[--ssh <host>] and prints the line that copies the token to <host>
|
|
15
|
+
pix3 agent-setup [claude|codex] Write the project's MCP config for chrome-devtools-mcp
|
|
16
|
+
[--repair] [--cdp-port <n>] (.mcp.json, .codex/config.toml, with the proxy token);
|
|
17
|
+
[--remote] --repair fixes an entry that drifted (version, port,
|
|
18
|
+
[--project <dir>] token, the P1 --browserUrl launch); --remote: the agent
|
|
19
|
+
is on an SSH host, Chrome on your machine (forwarded)
|
|
20
|
+
pix3 validate [paths\u2026] [--json] Strict scene check: schema, references, guards, then
|
|
21
|
+
[--no-hydrate] each scene loaded as the game loads it (exit 1 on errors)
|
|
22
|
+
pix3 check [--json] validate + TypeScript check of the scripts + version
|
|
23
|
+
[--no-hydrate] [--offline] check (exit 1 on errors)
|
|
24
|
+
[--project <dir>]
|
|
25
|
+
pix3 smoke [scene] [--json] Run the game headless in Node for N frames (no browser):
|
|
26
|
+
[--changed | --all] script throws with frame + stack, console errors, missing
|
|
27
|
+
[--frames N] [--timeout S] res:// (exit 1 on errors, 2 when it cannot run). No scene =
|
|
28
|
+
[--project <dir>] the scenes git changes reach, else every top-level scene
|
|
29
|
+
pix3 tree [scene] [--json] One line per node (type#id, pos, size, layout, components,
|
|
30
|
+
[--depth N] [--types A,B] prefab instances); no scene = project overview
|
|
31
|
+
[--props] [--project <dir>]
|
|
32
|
+
pix3 kit [--update] Install (or update) the agent kit: AGENTS.md, CLAUDE.md,
|
|
33
|
+
[--migrate] .claude/skills/pix3-*, script types; --migrate: a 1.x kit
|
|
34
|
+
[--project <dir>] \u2192 2.x (drops the pix3 mcp server, retired files, pix3Hybrid)
|
|
35
|
+
pix3 character-compile <spec> A 2D character from frame PNGs: <slug>.pix3anim with
|
|
36
|
+
[--dry-run] [--force] <variant>.<state> clips + a prefab with
|
|
37
|
+
[--json] [--project <dir>] core:CharacterVisual2D (refuses to overwrite)
|
|
38
|
+
pix3 sfx <preset|"text"> Synthesize a sound effect offline into a WAV (coin, jump,
|
|
39
|
+
[--out <file.wav>] hit, explosion, powerup, click; or "big explosion")
|
|
40
|
+
[--seed <n>] [--json]
|
|
41
|
+
pix3 gap "<what was missing>" Record a gap Pix3 had (you worked around it) in
|
|
42
|
+
[--kind capability|tool|node|doc|other] .pix3/gaps.jsonl;
|
|
43
|
+
[--detail <text>] [--context <text>] --list prints them
|
|
44
|
+
[--agent <name>] [--list] [--json] [--project <dir>]
|
|
45
|
+
pix3 help <command> That command's own usage (also pix3 <command> --help)
|
|
46
|
+
pix3 --version
|
|
47
|
+
`,pt={new:`Usage: pix3 new [2d|3d] [dir] [--name <project name>]
|
|
48
|
+
|
|
49
|
+
Without a starter: list them. With one: create an empty Vite + @pix3/vite-plugin project in dir
|
|
50
|
+
(default pix3-<2d|3d>) with the agent kit (AGENTS.md, CLAUDE.md, .claude/skills/pix3-*, script
|
|
51
|
+
types). The same as npm create pix3.
|
|
52
|
+
|
|
53
|
+
--name name the project name (default: from the folder)
|
|
54
|
+
`,editor:`Usage: pix3 editor [--project <dir>] [--stop] [--stop-chrome] [--chrome-only] [--no-chrome]
|
|
55
|
+
[--headless] [--port <n>] [--cdp-port <n>] [--url <editor url>] [--ssh <host>]
|
|
56
|
+
[--remote-port <n>]
|
|
57
|
+
|
|
58
|
+
Find the project's Vite dev server (.pix3/dev.json), or start it detached, and open the editor
|
|
59
|
+
(/__pix3/) in a Chrome whose DevTools are reachable only through the token proxy
|
|
60
|
+
ws://127.0.0.1:9333/pix3 (the next free port up to 9339 when that one is taken). Idempotent.
|
|
61
|
+
Over SSH it prints what to run on your machine instead of starting Chrome.
|
|
62
|
+
|
|
63
|
+
--project dir project folder (default: nearest folder with pix3project.yaml)
|
|
64
|
+
--stop stop the dev server this command started
|
|
65
|
+
--stop-chrome close the Chrome (and its proxy) pix3 editor started
|
|
66
|
+
--no-chrome only the dev server
|
|
67
|
+
--chrome-only only Chrome, for a dev server that already runs
|
|
68
|
+
--headless headless Chrome (a plain tab)
|
|
69
|
+
--port n the dev server's port (Vite --port --strictPort)
|
|
70
|
+
--cdp-port n the proxy's preferred port (default 9333); over SSH: the one RemoteForward
|
|
71
|
+
port of this host (stored; never a scan)
|
|
72
|
+
--url url on your machine: open a forwarded remote editor (no project here)
|
|
73
|
+
--ssh host with --url: the host the printed token-copy line names
|
|
74
|
+
--remote-port n with --url: the remote port of your RemoteForward line (default 9333) \u2014 the
|
|
75
|
+
only one the proxy proves its token for
|
|
76
|
+
`,"agent-setup":`Usage: pix3 agent-setup [claude|codex] [--repair] [--remote] [--cdp-port <n>] [--project <dir>]
|
|
77
|
+
|
|
78
|
+
Write the project's MCP config for chrome-devtools-mcp \u2014 .mcp.json (Claude Code) and/or
|
|
79
|
+
.codex/config.toml (Codex), both by default \u2014 pointing at the token proxy through the 0600 file
|
|
80
|
+
~/.pix3/cdp-mcp.json (no token in the project or on a command line).
|
|
81
|
+
|
|
82
|
+
--repair rewrite an entry that drifted (version, port, token, an older launch)
|
|
83
|
+
--remote the agent runs on an SSH host, Chrome on your machine (through the forward)
|
|
84
|
+
--cdp-port n the proxy port (default: the one pix3 editor recorded, else 9333); with
|
|
85
|
+
--remote the RemoteForward port (stored; default the one pix3 editor stored)
|
|
86
|
+
--project dir project folder (default: nearest folder with pix3project.yaml)
|
|
87
|
+
`,validate:`Usage: pix3 validate [paths\u2026] [--json] [--no-hydrate] [--project <dir>]
|
|
88
|
+
|
|
89
|
+
paths .pix3scene / .prefab files or folders (default: every scene and .prefab)
|
|
90
|
+
--json machine-readable report (diagnostics + sha256 of each validated file)
|
|
91
|
+
--no-hydrate do not load the scenes as the game does: no project code runs (user: component
|
|
92
|
+
properties not checked)
|
|
93
|
+
--project dir project root (default: nearest folder with pix3project.yaml)
|
|
94
|
+
`,check:`Usage: pix3 check [--json] [--no-hydrate] [--offline] [--no-sync] [--project <dir>]
|
|
95
|
+
|
|
96
|
+
Everything \`pix3 validate\` checks, plus a TypeScript type-check of the project's scripts
|
|
97
|
+
(tsc --noEmit) and a version check.
|
|
98
|
+
|
|
99
|
+
--json machine-readable report (diagnostics, sha256 of every checked file, typecheck,
|
|
100
|
+
kit)
|
|
101
|
+
--no-hydrate do not load the scenes as the game does (user: component properties not checked)
|
|
102
|
+
--offline never install TypeScript (fails with the command to run instead)
|
|
103
|
+
--no-sync do not ask a running Pix3 editor (.pix3/dev.json) to flush its unsaved scenes first
|
|
104
|
+
--project dir project root (default: nearest folder with pix3project.yaml)
|
|
105
|
+
`,smoke:`Usage: pix3 smoke [scene] [--changed | --all] [--frames N] [--timeout S] [--json] [--no-sync] [--project <dir>]
|
|
106
|
+
|
|
107
|
+
Run the game headless in Node \u2014 no browser, no editor: the project's scripts compiled, the scene
|
|
108
|
+
loaded by the real loader, N frames of 1/60 s stepped by the real SceneRunner. Reports every
|
|
109
|
+
script throw (onAttach/onStart/onUpdate, with script name, frame and stack), console.error/warn,
|
|
110
|
+
unhandled rejections, missing res:// files and per-frame step time. Nothing is rendered; audio,
|
|
111
|
+
input and network are inert.
|
|
112
|
+
|
|
113
|
+
scene .pix3scene to run (res://, project-relative or a path) \u2014 the surest way to test
|
|
114
|
+
the game: pix3 smoke scenes/main.pix3scene. With no scene, several run one after
|
|
115
|
+
another, a line each: in a git repo with uncommitted changes, the top-level scenes
|
|
116
|
+
those changes reach (the scene, a prefab/overlay it instances, a user: script it
|
|
117
|
+
attaches); otherwise \u2014 or when a changed scene/script reaches none \u2014 every
|
|
118
|
+
top-level scene (not a prefab or a .prefab, not scenes/ui), scenes/main.pix3scene
|
|
119
|
+
first.
|
|
120
|
+
--changed only the scenes changed files reach (needs git; exit 2 when nothing changed)
|
|
121
|
+
--all every top-level scene, whatever git says
|
|
122
|
+
--frames N frames to step (default 120 = 2 s of game time)
|
|
123
|
+
--timeout S wall-clock limit in seconds (default 20) \u2192 exit 2, E_SMOKE_TIMEOUT
|
|
124
|
+
--json machine-readable report
|
|
125
|
+
--no-sync do not ask a running Pix3 editor (.pix3/dev.json) to flush its unsaved scenes first
|
|
126
|
+
--project dir project folder (default: nearest folder with pix3project.yaml)
|
|
127
|
+
|
|
128
|
+
Exit: 0 = no errors, 1 = errors, 2 = could not run (no scene, bundle failure, unsupported, timeout,
|
|
129
|
+
or E_RUNTIME_VERSION: the project installs another @pix3/runtime than this CLI runs).
|
|
130
|
+
`,tree:`Usage: pix3 tree [scene] [--depth N] [--types A,B] [--props] [--json] [--project <dir>]
|
|
131
|
+
|
|
132
|
+
One line per node \u2014 type#id "name", position, size, anchor layout, components, prefab
|
|
133
|
+
instances (\u21B3 instance res://\u2026 (N overrides, M properties)) \u2014 indented by depth. Read this instead of the
|
|
134
|
+
whole .pix3scene when you need to find your way around a scene. A node anchored by margins
|
|
135
|
+
(layout: left/right/top/bottom) shows them \u2014 layout=left/top(left=40,top=30) \u2014 and the pos and
|
|
136
|
+
size they give at the design size (the parent's size, viewportBaseSize for a root; ? where the
|
|
137
|
+
file does not say enough), not the 0 its file holds on that axis.
|
|
138
|
+
|
|
139
|
+
scene .pix3scene (res://, project-relative or a path). Without one: every scene and
|
|
140
|
+
prefab in the project with node counts, node types and components.
|
|
141
|
+
--depth N stop N levels below the roots (0 = roots only); cut subtrees show "\u2026 +K below"
|
|
142
|
+
--types A,B only nodes of these types (or carrying these components; \`instance\` = prefab
|
|
143
|
+
instances), with their ancestors as "\xB7" context lines
|
|
144
|
+
--props also print each node's properties that differ from the type's defaults
|
|
145
|
+
--json the same as nested JSON
|
|
146
|
+
--project dir project folder (default: nearest folder with pix3project.yaml, else cwd)
|
|
147
|
+
`,kit:`Usage: pix3 kit [--update] [--migrate] [--project <dir>]
|
|
148
|
+
|
|
149
|
+
Install the agent kit into a project: AGENTS.md, CLAUDE.md, .claude/skills/pix3-*, the script
|
|
150
|
+
types (.pix3/types). An existing file is left alone unless --update; a file you edited is never
|
|
151
|
+
overwritten.
|
|
152
|
+
|
|
153
|
+
--update replace kit files that are unedited and out of date
|
|
154
|
+
--migrate a 1.x kit \u2192 2.x: drop the pix3 mcp server from .mcp.json, the retired files and
|
|
155
|
+
metadata.pix3Hybrid, then --update (edited files kept and reported)
|
|
156
|
+
--project dir project folder (default: nearest folder with pix3project.yaml)
|
|
157
|
+
`,"character-compile":`Usage: pix3 character-compile <spec.yaml|spec.json> [--project <dir>] [--dry-run] [--force] [--json]
|
|
158
|
+
|
|
159
|
+
Build a 2D character from frame PNGs: <sprites>/<slug>/<slug>.pix3anim (clips named
|
|
160
|
+
<variant>.<state>), the frames copied beside it as <variant>_<state>_<nnnn>.png, and the prefab
|
|
161
|
+
<prefabs>/<Name>.pix3scene \u2014 an AnimatedSprite2D root with core:CharacterVisual2D. Game code
|
|
162
|
+
then says character.playState('attack', { restart: true }) / character.setVariant('bow').
|
|
163
|
+
|
|
164
|
+
The spec (paths relative to the spec file):
|
|
165
|
+
name: Goblin # display name and prefab file name
|
|
166
|
+
slug: goblin # sprite folder (default: from name)
|
|
167
|
+
anchor: { x: 0.5, y: 0.9 } # where the node position lands, y from the top (the feet)
|
|
168
|
+
defaultVariant: sword # the pair the prefab starts on (default: the first clip's)
|
|
169
|
+
defaultState: idle
|
|
170
|
+
spriteDirectory: sprites # default sprites
|
|
171
|
+
prefabDirectory: scenes/prefabs # default scenes/prefabs
|
|
172
|
+
clips:
|
|
173
|
+
- { variant: sword, state: idle, fps: 10, frames: [art/sword/idle_1.png, art/sword/idle_2.png] }
|
|
174
|
+
- { variant: sword, state: attack, sequence: art/sword/attack } # art/sword/attack_<n>.png
|
|
175
|
+
- { state: die, sequence: art/die, loop: false } # no variant: clip "die"
|
|
176
|
+
|
|
177
|
+
Defaults are proposals and are printed as warnings: fps 12; loop false for attack, die, death,
|
|
178
|
+
hit and hurt, true otherwise. Frames must be PNG.
|
|
179
|
+
|
|
180
|
+
--project dir project root (default: nearest folder with pix3project.yaml)
|
|
181
|
+
--dry-run print what would be written, write nothing
|
|
182
|
+
--force replace files that exist with other bytes (default: refuse, write nothing)
|
|
183
|
+
--json machine-readable report
|
|
184
|
+
|
|
185
|
+
Exit: 0 = written (or nothing to do), 1 = refused (bad spec, missing frame, existing files),
|
|
186
|
+
2 = usage or no project.
|
|
187
|
+
`,sfx:`Usage: pix3 sfx <preset|"description"> [--out <file.wav>] [--seed <n>] [--json]
|
|
188
|
+
|
|
189
|
+
Synthesizes a short sound effect offline into a 44.1 kHz 16-bit mono WAV.
|
|
190
|
+
presets ${Ae.join(", ")}
|
|
191
|
+
description words that name a preset ("coin pickup", "big explosion"), plus modifiers:
|
|
192
|
+
high/low, short/long, soft
|
|
193
|
+
--out output file (default: audio/<preset>.wav in the project root)
|
|
194
|
+
--seed a variation of the preset (same seed, same sound); default: the preset as tuned
|
|
195
|
+
--json print { path, res, durationMs, preset, seed, modifiers, bytes, peak, params }
|
|
196
|
+
Reference it from a scene or script as res://<path inside the project>.
|
|
197
|
+
`,gap:`Usage: pix3 gap "<what was missing>" [--kind capability|tool|node|doc|other] [--detail <text>]
|
|
198
|
+
[--context <text>] [--agent <name>] [--json] [--project <dir>]
|
|
199
|
+
pix3 gap --list [--json] [--project <dir>]
|
|
200
|
+
|
|
201
|
+
Record, in .pix3/gaps.jsonl, something Pix3 lacked that you worked around \u2014 not your own
|
|
202
|
+
mistakes or the game's features. One line per record.
|
|
203
|
+
|
|
204
|
+
--kind k capability, tool, node, doc or other (default other)
|
|
205
|
+
--detail text what you did instead
|
|
206
|
+
--context text the file or task it happened in
|
|
207
|
+
--agent name who records it (default: from the environment \u2014 claude-code, codex)
|
|
208
|
+
--list print the recorded gaps
|
|
209
|
+
--json machine-readable output
|
|
210
|
+
--project dir project folder (default: nearest folder with pix3project.yaml)
|
|
211
|
+
`};var ht=Y(H(),1);import{readdirSync as ut,readFileSync as ft}from"node:fs";import{isAbsolute as mt,join as re,relative as De,resolve as je,sep as Ie}from"node:path";var Ce=Y(H(),1);var G="pix3project.yaml";var U=Y(H(),1);var $=t=>typeof t=="object"&&t!==null&&!Array.isArray(t);var gt=new Set(["node_modules",".yalc",".git",".pix3","dist",".vite",".cache"]),yt=[".pix3scene",".prefab"],Et=t=>{let e=t.toLowerCase();return yt.some(s=>e.endsWith(s))},B=class{root;files;fileSet;textCache=new Map;constructor(e){this.root=je(e),this.files=Me(this.root,this.root).sort(),this.fileSet=new Set(this.files)}has(e){return this.fileSet.has(e)}absolute(e){return re(this.root,e)}relativeOf(e){let s=De(this.root,je(e));return s.startsWith("..")||mt(s)?null:s.split(Ie).join("/")}readText(e){let s=this.textCache.get(e);if(s!==void 0)return s;let n=ft(this.absolute(e),"utf8");return this.textCache.set(e,n),n}scenes(){return this.files.filter(Et)}},Me=(t,e)=>{let s=[],n;try{n=ut(e,{withFileTypes:!0})}catch{return s}for(let r of n)if(r.isDirectory()){if(gt.has(r.name))continue;s.push(...Me(t,re(e,r.name)))}else r.isFile()&&s.push(De(t,re(e,r.name)).split(Ie).join("/"));return s};import{mkdtempSync as kt,rmSync as _t,writeFileSync as Pt}from"node:fs";import{tmpdir as Rt}from"node:os";import{join as ne}from"node:path";import{pathToFileURL as Nt}from"node:url";var se=async t=>{try{return await import(t)}catch{return null}},K="pix3-stub",oe=(t,e,s)=>({stdin:{contents:e.map((n,r)=>`export * as __pix3_entry_${r} from ${JSON.stringify(`./${n}`)};`).join(`
|
|
212
|
+
`),resolveDir:t.root,sourcefile:s,loader:"ts"},bundle:!0,write:!1,format:"esm",target:"es2022",logLevel:"silent",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")}}),ie=(t,e,s,n)=>({name:t,setup(r){r.onResolve({filter:/^@pix3\/runtime$/},()=>({path:e.runtime,external:!0})),r.onResolve({filter:/^three$/},()=>({path:e.three,external:!0})),r.onResolve({filter:/\?(raw|url)$/},o=>{let[a,d]=o.path.split("?");return{path:ne(o.resolveDir,a),namespace:d==="raw"?"pix3-raw":"pix3-url"}}),r.onResolve({filter:/^[^./]/},o=>o.kind==="entry-point"?void 0:n(o,r)),r.onLoad({filter:/.*/,namespace:K},()=>({contents:"module.exports = {};",loader:"js"})),r.onLoad({filter:/.*/,namespace:"pix3-raw"},async o=>{let{readFile:a}=await import("node:fs/promises");return{contents:`export default ${JSON.stringify(await a(o.path,"utf8"))};`,loader:"js"}}),r.onLoad({filter:/.*/,namespace:"pix3-url"},o=>({contents:`export default ${JSON.stringify(`res://${s.relativeOf(o.path)??o.path}`)};`,loader:"js"}))}}),ae=t=>{let e=t.errors??[];return e.length>0?e:[{text:String(t),location:null}]},ce=async(t,e,s,n)=>{let r=kt(ne(Rt(),n)),o=ne(r,"scripts.mjs");try{Pt(o,t);let a=await import(Nt(o).href),d=[];return e.forEach((y,m)=>{let x=a[`__pix3_entry_${m}`];$(x)&&d.push(...ve(s,x,y))}),d}finally{_t(r,{recursive:!0,force:!0})}};var Ue=/Component type "(.*?)" is not registered yet — kept as pending on node "(.*?)"/;var Ke=Y(H(),1);var We=t=>{let e;if(t.has(G))try{let r=(0,Ke.parse)(t.readText(G));e=$(r)?r.localization:void 0}catch{e=void 0}if($(e)){let r=Array.isArray(e.locales)?[...new Set(e.locales.filter(a=>typeof a=="string"&&a!==""))]:[],o=typeof e.defaultLocale=="string"&&e.defaultLocale?e.defaultLocale:r[0]??"";if(o){let a=typeof e.fallbackLocale=="string"&&e.fallbackLocale?e.fallbackLocale:o;return{defaultLocale:o,fallbackLocale:a,locales:r.includes(o)?r:[o,...r],declared:!0}}}let s=t.files.map(r=>/^locales\/([^/]+)\.json$/.exec(r)?.[1]??null).filter(r=>r!==null).sort();if(s.length===0)return null;let n=s.includes("en")?"en":s[0];return{defaultLocale:n,fallbackLocale:n,locales:s,declared:!1}};var Ot=t=>t.replace(/\/\*[\s\S]*?\*\//g," ").replace(/(^|[^:\\])\/\/.*$/gm,"$1"),$t=/\bexport\s+(default\s+)?(?:abstract\s+)?class\s+([A-Za-z_$][\w$]*)?/g,At=/\bexport\s+(?:const|let|var)\s+([A-Za-z_$][\w$]*)\s*=\s*class\b/g,Lt=/\bexport\s+(type\s+)?\{([^}]*)\}/g,Tt=/\bexport\s+\*\s+(?:as\s+[A-Za-z_$][\w$]*\s+)?from\b/,Ye=t=>{let e=Ot(t),s=[];for(let n of e.matchAll($t))s.push(n[1]?"default":n[2]??"default");for(let n of e.matchAll(At))s.push(n[1]);for(let n of e.matchAll(Lt))if(!n[1])for(let r of n[2].split(",")){let o=r.trim();if(!o||o.startsWith("type "))continue;let a=/\bas\s+([A-Za-z_$][\w$]*)$/.exec(o);s.push(a?a[1]:o.split(/\s+/)[0])}return{names:s,hasStar:Tt.test(e)}};var He=t=>{let e=new Map,s=[],n=[];for(let r of t.files){if(!we(r))continue;let o;try{o=t.readText(r)}catch{continue}s.push(r);let{names:a,hasStar:d}=Ye(o);d&&n.push(r);for(let y of a){let m=`${be}${y}`;e.has(m)||e.set(m,r)}}return{ids:e,entries:s,opaqueEntries:n}};import{pathToFileURL as Ct}from"node:url";var Ve=t=>{let e=t.split("/");return t.startsWith("@")?e.slice(0,2).join("/"):e[0]},Ge=async(t,e,s,n,r={})=>{if(e.length===0)return{status:"none"};let o=await se(r.esbuildSpecifier??"esbuild");if(!o)return{status:"unavailable",reason:"esbuild is not installed (it is an optional dependency of @pix3/cli), so the project scripts cannot be compiled"};let a=new Set,d=new Set,y=r.fallbackResolveDir,m;try{m=(await o.build({...oe(t,e,"pix3-smoke-scripts.ts"),platform:"browser",absWorkingDir:t.root,sourcemap:"inline",sourceRoot:`${Ct(t.root).href.replace(/\/$/,"")}/`,plugins:[ie("pix3-smoke-imports",n,t,async(g,_)=>{if(g.pluginData==="pix3-smoke")return;if(g.path.startsWith("node:")||g.path.startsWith("virtual:"))return a.add(g.path),{path:g.path,namespace:K};let i=async P=>_.resolve(g.path,{kind:g.kind,resolveDir:P,pluginData:"pix3-smoke"}),f=await i(g.resolveDir);return f.errors.length>0&&y&&Ve(g.path)==="three"&&(f=await i(y)),f.errors.length>0||!f.path?(a.add(g.path),{path:g.path,namespace:K}):(d.add(Ve(g.path)),{path:f.path,external:f.external})})]})).outputFiles?.[0]?.text??""}catch(x){return{status:"compile-failed",failures:ae(x).map(g=>({message:g.text,file:g.location?.file,line:g.location?.line}))}}try{return{status:"loaded",registered:await ce(m,e,s,"pix3-smoke-scripts-"),stubbed:[...a].sort(),bundledPackages:[...d].sort()}}catch(x){return{status:"import-failed",error:x,stubbed:[...a].sort()}}};var jt=new Set(["window.AudioContext","window.webkitAudioContext","window.__PIX3_DEBUG__","window.ontouchstart","window.PointerEvent","window.visualViewport","window.chrome","<canvas>.depth"]),Dt=new Set(["then","toJSON","constructor","nodeType","asymmetricMatch","$$typeof","inspect","valueOf","toString"]),le=(t,e,s,n)=>new Proxy(t,{get(r,o,a){if(Reflect.has(r,o))return Reflect.get(r,o,a);if(n&&Reflect.has(n,o))return Reflect.get(n,o);if(typeof o=="symbol"||Dt.has(o))return;let d=`${e}.${o}`;jt.has(d)||(s.seen.has(d)||(s.seen.add(d),s.missing.push(d)),s.recent.push(d))},set(r,o,a){return Reflect.set(r,o,a),n&&typeof o=="string"&&Reflect.set(n,o,a),!0}}),z=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,s){this.data.set(String(e),String(s))}removeItem(e){this.data.delete(String(e))}clear(){this.data.clear()}},Be=(t,e)=>({x:0,y:0,left:0,top:0,right:t,bottom:e,width:t,height:e,toJSON:()=>({})}),It=(t,e)=>n=>{let r=new EventTarget,o=[],a=n==="canvas",d=new Set,y=new Map,m=null,x=i=>(i&&typeof i=="object"&&(Reflect.set(i,"parentElement",m),Reflect.set(i,"parentNode",m)),i),g=i=>(i&&typeof i=="object"&&Reflect.get(i,"parentElement")===m&&(Reflect.set(i,"parentElement",null),Reflect.set(i,"parentNode",null)),i),_={tagName:n.toUpperCase(),nodeName:n.toUpperCase(),style:{},dataset:{},children:o,childNodes:o,parentElement:null,parentNode:null,textContent:"",innerHTML:"",width:a?e.width:0,height:a?e.height:0,clientWidth:a?e.width:0,clientHeight:a?e.height:0,offsetWidth:a?e.width:0,offsetHeight:a?e.height:0,classList:{add:(...i)=>i.forEach(f=>d.add(f)),remove:(...i)=>i.forEach(f=>d.delete(f)),toggle:(i,f)=>{let P=f??!d.has(i);return P?d.add(i):d.delete(i),P},contains:i=>d.has(i)},addEventListener:r.addEventListener.bind(r),removeEventListener:r.removeEventListener.bind(r),dispatchEvent:r.dispatchEvent.bind(r),getBoundingClientRect:()=>a?Be(e.width,e.height):Be(0,0),getContext:i=>a&&i==="2d"?Oe():null,appendChild:i=>(o.push(i),x(i)),removeChild:i=>{let f=o.indexOf(i);return f>=0&&o.splice(f,1),g(i)},insertBefore:i=>(o.push(i),x(i)),append:(...i)=>{o.push(...i.map(x))},prepend:(...i)=>{o.unshift(...i.map(x))},remove:()=>{let i=_.parentElement,f=i&&typeof i=="object"?Reflect.get(i,"removeChild"):void 0;typeof f=="function"&&f(m??{})},contains:i=>i===m||o.includes(i),setAttribute:(i,f)=>{y.set(i,String(f))},getAttribute:i=>y.get(i)??null,removeAttribute:i=>{y.delete(i)},hasAttribute:i=>y.has(i),querySelector:()=>null,querySelectorAll:()=>[],focus:()=>{},blur:()=>{},click:()=>{},setPointerCapture:()=>{},releasePointerCapture:()=>{},hasPointerCapture:()=>!1,requestPointerLock:()=>{},animate:()=>({cancel:()=>{},finished:Promise.resolve()})};return m=le(_,`<${n}>`,t),m},Mt=t=>{let e=new EventTarget,s="",n={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(n,"src",{get:()=>s,set:r=>{s=String(r),setTimeout(()=>{Object.assign(n,{complete:!0,width:1,height:1,naturalWidth:1,naturalHeight:1}),t(),e.dispatchEvent(new Event("load"));let o=n.onload;typeof o=="function"&&o.call(n,new Event("load"))},0)}}),n},C=(t,e)=>{let s=class{};return Object.defineProperty(s,"name",{value:t}),Object.defineProperty(s,Symbol.hasInstance,{value:n=>{if(n===null||typeof n!="object")return!1;let r=Reflect.get(n,"tagName");return typeof r=="string"&&(e===null||e.includes(r))}}),s},D=t=>{let e=class extends Event{constructor(s,n={}){super(s,n),Object.assign(this,n)}};return Object.defineProperty(e,"name",{value:t}),e},ze={Node:()=>C("Node",null),Element:()=>C("Element",null),HTMLElement:()=>C("HTMLElement",null),HTMLCanvasElement:()=>C("HTMLCanvasElement",["CANVAS"]),HTMLDivElement:()=>C("HTMLDivElement",["DIV"]),HTMLImageElement:()=>C("HTMLImageElement",["IMG"]),HTMLVideoElement:()=>C("HTMLVideoElement",["VIDEO"]),PointerEvent:()=>D("PointerEvent"),MouseEvent:()=>D("MouseEvent"),KeyboardEvent:()=>D("KeyboardEvent"),TouchEvent:()=>D("TouchEvent"),WheelEvent:()=>D("WheelEvent"),FocusEvent:()=>D("FocusEvent")},Ft=[...Object.keys(ze),"Image","window","self","document","localStorage","sessionStorage","requestAnimationFrame","cancelAnimationFrame","matchMedia","getComputedStyle","innerWidth","innerHeight","devicePixelRatio"],qe=t=>{let e={missing:[],seen:new Set,recent:[]},s=0,n=()=>Mt(()=>{s+=1}),r=It(e,t),o=new EventTarget,a=new EventTarget,d=r("body"),y=r("head"),m=r("html"),x={body:d,head:y,documentElement:m,visibilityState:"visible",hidden:!1,readyState:"complete",fonts:{add:()=>{},delete:()=>{},load:()=>Promise.resolve([]),ready:Promise.resolve(),check:()=>!0},hasFocus:()=>!0,createElement:p=>{let E=String(p).toLowerCase();return E==="img"?n():r(E)},createElementNS:(p,E)=>E==="img"?n():r(String(E).toLowerCase()),createTextNode:p=>({textContent:p}),getElementById:()=>null,getElementsByClassName:()=>[],getElementsByTagName:()=>[],querySelector:()=>null,querySelectorAll:()=>[],addEventListener:a.addEventListener.bind(a),removeEventListener:a.removeEventListener.bind(a),dispatchEvent:a.dispatchEvent.bind(a)},g=le(x,"document",e),_=0,i=new Map,f=p=>{let E=++_;return i.set(E,setTimeout(()=>{i.delete(E),p(performance.now())},16)),E},P=p=>{let E=i.get(p);E!==void 0&&clearTimeout(E),i.delete(p)},I=p=>({matches:!1,media:p,onchange:null,addEventListener:()=>{},removeEventListener:()=>{},addListener:()=>{},removeListener:()=>{}}),R={document:g,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 z,sessionStorage:new z,requestAnimationFrame:f,cancelAnimationFrame:P,matchMedia:I,getComputedStyle:()=>({getPropertyValue:()=>""}),addEventListener:o.addEventListener.bind(o),removeEventListener:o.removeEventListener.bind(o),dispatchEvent:o.dispatchEvent.bind(o),focus:()=>{},blur:()=>{},open:()=>null,alert:()=>{},confirm:()=>!1,prompt:()=>null,scrollTo:()=>{}},w=le(R,"window",e,globalThis);R.window=w,R.self=w,R.top=w,R.parent=w;let N=new Map,S=(p,E)=>{N.set(p,Object.getOwnPropertyDescriptor(globalThis,p)),Object.defineProperty(globalThis,p,{value:E,configurable:!0,writable:!0})};S("window",w),S("self",w),S("document",g),S("localStorage",R.localStorage),S("sessionStorage",R.sessionStorage),S("requestAnimationFrame",f),S("cancelAnimationFrame",P),S("matchMedia",I),S("getComputedStyle",R.getComputedStyle),S("innerWidth",t.width),S("innerHeight",t.height),S("devicePixelRatio",1);for(let[p,E]of Object.entries(ze))typeof Reflect.get(globalThis,p)>"u"&&S(p,E());return S("Image",function(){return n()}),{get imagesLoaded(){return s},get missing(){return e.missing},takeRecentMissing(){let p=[...new Set(e.recent)];return e.recent=[],p},uninstall(){for(let p of i.values())clearTimeout(p);i.clear();for(let p of Ft){if(!N.has(p))continue;let E=N.get(p);E?Object.defineProperty(globalThis,p,E):Reflect.deleteProperty(globalThis,p)}}}};var Ut=Number.MAX_SAFE_INTEGER,Kt=128,Wt=(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})}),Je=async(t=1)=>{for(let e=0;e<t;e+=1){for(let s=0;s<4;s+=1)await Promise.resolve();await new Promise(s=>{let n=new MessageChannel;n.port1.onmessage=()=>{n.port1.close(),n.port2.close(),s()},n.port2.postMessage(null)})}},Xe=t=>{let e=0,s=n=>{e+=1;for(let r of n.children)r instanceof Ee&&s(r)};return t.forEach(s),e},de=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)}},Yt=/\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/,Ht=40,Vt=[/^\[NodeBase\] Script ".*" threw in/,/^\[SceneRunner\] Error during game update/,/^\[GameCommands\]/],Ze=async(t,e)=>{let s=performance.now(),n=0,r=[],o=new Map,a=[],d=qe(t.viewport),y=c=>{let u=d.takeRecentMissing(),l=Yt.test(c.message)||u.length>0&&/^TypeError\b/.test(c.message);r.push({...c,code:l?"E_SMOKE_DOM":c.code,frame:c.frame??n,...l&&u.length>0?{domAccess:u.slice(-5)}:{}})},m=(c,u)=>{let l=`${c}\0${u}`,k=o.get(l);if(k){k.count+=1;return}o.set(l,{warning:{code:c,frame:n,message:u},count:1})},x=0,g={warn:console.warn,error:console.error,log:console.log,info:console.info,debug:console.debug},_=[],i=0,f=(...c)=>{i+=1,_.length<Ht&&_.push(`[frame ${n}] ${c.map(de).join(" ")}`)};console.log=f,console.info=f,console.debug=()=>{},console.warn=(...c)=>{let u=c.find(v=>v instanceof Error);if(u instanceof $e){x+=1;return}let l=c.map(de).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 k=Ue.exec(l);k?m("W_SMOKE_PENDING_COMPONENT",`${k[1]} on node "${k[2]}" is not registered \u2014 it never runs.`):u instanceof Q?m("W_SMOKE_MISSING_RESOURCE",`${u.resource} does not exist (${l.split(":")[0]}).`):/^\[(SceneLoader|AssetLoader|ResourceManager|SceneRunner|SceneService)\]/.test(l)?m("W_SMOKE_LOADER",l):m("W_SMOKE_CONSOLE_WARN",l)},console.error=(...c)=>{let u=c.map(de).join(" ");if(Vt.some(k=>k.test(u)))return;let l=c.find(k=>k instanceof Error);y({code:"E_SMOKE_CONSOLE_ERROR",message:u,...l instanceof Error&&l.stack?{stack:l.stack}:{}})};let P=c=>{let{message:u,stack:l}=T(c);y({code:"E_SMOKE_UNHANDLED",phase:"promise",message:u,...l?{stack:l}:{}})},I=c=>{let{message:u,stack:l}=T(c);y({code:"E_SMOKE_UNHANDLED",phase:"timer",message:u,...l?{stack:l}:{}})};process.on("unhandledRejection",P),process.on("uncaughtException",I);let R=ye(c=>{let u=c.phase==="tick"?"E_SMOKE_TICK":c.phase==="command"?"E_SMOKE_COMMAND":"E_SMOKE_SCRIPT";y({code:u,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}:{}})}),w=null,N={compile:0,load:0,firstFrame:0},S=[],p=0,E=0,q=0,pe=!1,ue=[],M=()=>{let c=[...S].sort((b,O)=>b-O),u=S.reduce((b,O)=>b+O,0),l=b=>Math.round(b*100)/100;x>0&&a.push(`${x} model/Spine asset load(s) not decoded headless: those nodes exist but have no mesh or skeleton.`),d.imagesLoaded>0&&a.push(`${d.imagesLoaded} image(s) loaded through the DOM (three's TextureLoader) resolved as blank 1\xD71 pictures.`);let k=null,v=ge();if(v){let b=null;try{b=JSON.parse(JSON.stringify(v.snapshot?.()??null))}catch(O){b={error:T(O).message}}k={name:v.name,snapshot:b}}let W=[...o.values()].map(({warning:b,count:O})=>O>1?{...b,count:O}:b);return{ok:r.length===0,scene:t.scene,frames:q,framesRequested:t.frames,firstFrameOk:pe&&q>=Math.min(1,t.frames)&&!r.some(b=>b.frame<=1),errors:r,warnings:W,nodes:{start:p,end:E},timingsMs:{compile:l(N.compile),load:l(N.load),firstFrame:l(N.firstFrame),step:{total:l(u),mean:l(S.length>0?u/S.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()-s)},scripts:ue,domMissing:[...d.missing],notes:a,game:k,logs:{count:i,lines:_}}};try{let c=new B(t.projectRoot),u=new xe;Ne(u);let l=performance.now(),k=He(c),v=await Ge(c,k.entries,u,e,{esbuildSpecifier:t.esbuildSpecifier,fallbackResolveDir:t.fallbackResolveDir});switch(N.compile=performance.now()-l,v.status){case"unavailable":return{ok:!1,code:"E_SMOKE_UNSUPPORTED",reason:v.reason,scene:t.scene};case"compile-failed":for(let h of v.failures)y({code:"E_SMOKE_SCRIPT_COMPILE",message:`${h.file?`${h.file}${h.line?`:${h.line}`:""}: `:""}${h.message}`});return M();case"import-failed":{let{message:h,stack:A}=T(v.error);y({code:"E_SMOKE_SCRIPT_IMPORT",message:`The project scripts threw when imported (module top level): ${h}`,...A?{stack:A}:{}});for(let L of v.stubbed)m("W_SMOKE_STUBBED_IMPORT",`import "${L}" resolved nowhere and was replaced by an empty module.`);return M()}case"loaded":ue=v.registered;for(let h of v.stubbed)m("W_SMOKE_STUBBED_IMPORT",`import "${h}" resolved nowhere (not installed in the project) and was replaced by an empty module \u2014 code using it will not work headless.`);v.bundledPackages.length>0&&a.push(`Bundled from the project's node_modules: ${v.bundledPackages.join(", ")}.`),v.bundledPackages.some(h=>h.startsWith("@dimforge/rapier"))&&a.push("Rapier physics is loaded from the project (WASM, initialised by the game scripts).");break;case"none":break}let W=new Z(c.root),b=new ee(W),O=new X(b,u,W),Qe=new _e(O),fe=document.createElement("canvas");document.body.appendChild(fe);let me=!1;Pe(()=>new Promise(()=>{}));let et=new Se;w=new Re(Qe,Wt(fe,()=>{me||a.push("The scene has an active PostProcess node: post-processing is not run headless."),me=!0}),et,b,t.viewport),w.setTimeMode({mode:"manual",fixedDeltaSec:1/60,renderEveryNTicks:Ut,muteAudio:!0}),w.setAutoloads(ke(t.autoloads),u);let he=We(c);if(he){let{defaultLocale:h,fallbackLocale:A,locales:L}=he;w.setLocalizationConfig({defaultLocale:h,fallbackLocale:A,locales:L})}let tt=performance.now();try{await w.loadAndStartScene(t.scene),await Je(Kt),pe=!0}catch(h){let A=h instanceof J&&h.details.length>0?` (${h.details.join("; ")})`:"",{message:L,stack:F}=T(h);return y({code:"E_SMOKE_LOAD",message:`${L}${A}`,...F?{stack:F}:{}}),M()}finally{N.load=performance.now()-tt}p=Xe(w.getLiveRootNodes());for(let h=1;h<=t.frames;h+=1){n=h,d.takeRecentMissing();let A=performance.now(),L=w.stepFrames(1),F=performance.now()-A;if(L===0){m("W_SMOKE_STOPPED",`The runner stopped before frame ${h} (a script stopped or paused the game).`);break}q+=1,S.push(F),h===1&&(N.firstFrame=F),await Je()}return E=Xe(w.getLiveRootNodes()),a.push("Audio is silent (no Web Audio in Node); input receives no events; nothing is rendered."),M()}catch(c){let{message:u,stack:l}=T(c);return y({code:"E_SMOKE_TICK",message:u,...l?{stack:l}:{}}),M()}finally{try{w?.stop()}catch{}R(),process.off("unhandledRejection",P),process.off("uncaughtException",I),Object.assign(console,g),d.uninstall()}};process.setSourceMapsEnabled(!0);var zt={runtime:new URL("./runtime.mjs",import.meta.url).href,three:new URL("./three.mjs",import.meta.url).href},qt=await Ze(Bt,zt);Gt?.postMessage(qt);
|
|
@@ -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-4DGG2BKR.mjs";import{Nb as u,_f as p,cd as y}from"./chunk-YLBMUJ2H.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};
|