@tora-editor/tora 0.1.0 → 0.2.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/README.md +108 -58
- package/assets/free-audio/arcade-pop/audio/loss.wav +0 -0
- package/assets/free-audio/arcade-pop/audio/reward.wav +0 -0
- package/assets/free-audio/arcade-pop/audio/win.wav +0 -0
- package/assets/free-audio/arcade-pop/source/INFO.txt +11 -11
- package/assets/kenney-food-starter/License.txt +28 -0
- package/assets/kenney-food-starter/burger.glb +0 -0
- package/assets/kenney-food-starter/frying-pan.glb +0 -0
- package/assets/kenney-food-starter/plan.json +61 -0
- package/assets/kenney-food-starter/plate.glb +0 -0
- package/assets/kenney-food-starter/pot.glb +0 -0
- package/assets/kenney-harvest/audio/victory.wav +0 -0
- package/assets/kenney-harvest/source/music-jingles/OGG/jingles_NES/jingles_NES03.ogg +0 -0
- package/assets/kenney-harvest/source/music-jingles/OGG/jingles_PIZZA/jingles_PIZZA03.ogg +0 -0
- package/assets/kenney-harvest/source/music-jingles/license.txt +14 -0
- package/bin/tora.mjs +77 -9
- package/crates/packer/trusted/native-3d-meta.json +3 -2
- package/crates/packer/trusted/native-3d.js +181 -181
- package/crates/packer/trusted/native-meta.json +2 -2
- package/crates/packer/trusted/native.js +5 -5
- package/crates/packer/trusted/release-manifest.json +17 -17
- package/crates/packer/trusted/review-runtime-meta.json +3 -2
- package/crates/packer/trusted/review-runtime.js +182 -182
- package/docs/TORA_AGENT_SETUP.md +24 -13
- package/docs/TORA_CREATION_API.md +29 -12
- package/docs/reference/CORE_AUTHORING.md +2 -1
- package/docs/reference/PLAYABLE_STARTERS.md +20 -0
- package/docs/reference/packs/3d.md +9 -3
- package/network-rules/mintegral-appgrowth-single-html.json +10 -10
- package/package.json +6 -6
- package/packages/creative-project/project-v21.schema.json +264 -8
- package/scripts/lean/editor/review-editor.css +10 -0
- package/scripts/lean/editor/review-editor.js +117 -1
- package/scripts/lean/native/agent-tools.mjs +7 -7
- package/scripts/lean/native/api.mjs +16 -5
- package/scripts/lean/native/asset-catalog.mjs +7 -6
- package/scripts/lean/native/asset-lineage.mjs +54 -0
- package/scripts/lean/native/asset-prep.mjs +173 -40
- package/scripts/lean/native/assets.mjs +107 -11
- package/scripts/lean/native/author-expansion-proofs.mjs +2 -99
- package/scripts/lean/native/author-fps.mjs +545 -0
- package/scripts/lean/native/author-primitive-proofs.mjs +5 -4
- package/scripts/lean/native/build-cache.mjs +2 -2
- package/scripts/lean/native/cc0-inputs.mjs +24 -0
- package/scripts/lean/native/cc0-staging.mjs +28 -8
- package/scripts/lean/native/check-harvest-outcome-audio.mjs +7 -8
- package/scripts/lean/native/check-salvage.mjs +8 -5
- package/scripts/lean/native/compiler.mjs +9 -3
- package/scripts/lean/native/contracts.mjs +11 -8
- package/scripts/lean/native/creative-qa.mjs +305 -122
- package/scripts/lean/native/demos.mjs +47 -3
- package/scripts/lean/native/document.mjs +36 -10
- package/scripts/lean/native/export-budget.mjs +75 -0
- package/scripts/lean/native/glb-loader.mjs +468 -0
- package/scripts/lean/native/intake-creator-tools.mjs +83 -30
- package/scripts/lean/native/local-bundle.mjs +5 -3
- package/scripts/lean/native/mcp-server.mjs +33 -46
- package/scripts/lean/native/media-validate.mjs +124 -0
- package/scripts/lean/native/native-bin.mjs +3 -3
- package/scripts/lean/native/outcome-playthrough.mjs +97 -0
- package/scripts/lean/native/prepare-fps-assets.mjs +330 -0
- package/scripts/lean/native/project-bundle.mjs +3 -3
- package/scripts/lean/native/remote-cc0-fetcher.mjs +403 -197
- package/scripts/lean/native/review-agent-tools.mjs +2 -2
- package/scripts/lean/native/review.mjs +3 -0
- package/scripts/lean/native/runtime.mjs +242 -56
- package/scripts/lean/native/schema.mjs +7 -5
- package/scripts/lean/native/service.mjs +159 -32
- package/scripts/lean/native/stage-3d.mjs +343 -40
- package/scripts/lean/native/starters.mjs +436 -0
- package/scripts/lean/native/verify.mjs +1 -1
- package/scripts/lean/native/win-cues.mjs +96 -0
- package/skills/tora-playables/SKILL.md +1 -1
|
@@ -5,6 +5,7 @@ import {mkdir,writeFile} from 'node:fs/promises';
|
|
|
5
5
|
import {AssetCatalog} from './asset-catalog.mjs';
|
|
6
6
|
import {emptyProject,applyOperations} from './document.mjs';
|
|
7
7
|
import {compileNative} from './compiler.mjs';
|
|
8
|
+
import {createSkyBlasterProject} from './author-fps.mjs';
|
|
8
9
|
|
|
9
10
|
async function proofAssets(requests){
|
|
10
11
|
const catalog=new AssetCatalog();await catalog.load();const assets=[],records=[];
|
|
@@ -130,105 +131,7 @@ export async function createFrostCleanProof(){
|
|
|
130
131
|
}
|
|
131
132
|
|
|
132
133
|
export async function createFpsArenaProof(){
|
|
133
|
-
|
|
134
|
-
['fps.ambient','3xblast-pop-punk-chiptune','ambient.wav','arcade'],['fps.fire.art','kenney-interface-sounds','tap.wav','arcade'],['fps.hit.art','kenney-interface-sounds','match.wav','arcade'],['fps.win.art','kenney-music-jingles','win.wav','arcade'],
|
|
135
|
-
]);
|
|
136
|
-
const mesh=(id,parentId,parameters,extra={})=>component(id,'native.mesh3d.v1',parameters,{parentId,...extra});
|
|
137
|
-
const boxWall=(id,x,z,sx,sy,sz,color='#476085')=>[
|
|
138
|
-
mesh(id,'fps.stage',{primitive:'box',x,y:sy/2,z,sx,sy,sz,color}),
|
|
139
|
-
mesh(id+'.cap','fps.stage',{primitive:'box',x,y:sy+.08,z,sx:sx+.08,sy:.16,sz:sz+.08,color:'#f2b544',unlit:true}),
|
|
140
|
-
behavior(id+'.phys',id,'physics-3d',{mode:'static',radius:.5,hx:sx/2,hz:sz/2,angle:0,friction:1,restitution:.5,maxSpeed:1,boundsX:12,boundsZ:12,ramp:false,restSpeed:.1,restDelaySeconds:.25}),
|
|
141
|
-
];
|
|
142
|
-
const uiText=(id,value,x,y,width,height,fontSize=24,extra={})=>component(id,'native.text.v1',{text:value,width,height,fontSize,fontFamily:'sans-serif',fontWeight:'900',color:'#fff5d6',align:'center'},{transform:[1,0,0,1,x,y],...extra});
|
|
143
|
-
const ops=[
|
|
144
|
-
group('fps.stage.wrap',0,0,390,700,{order:-10}),layout('fps.stage.wrap',0,0,700/390,390/700),
|
|
145
|
-
component('fps.stage','native.stage3d.v1',{width:390,height:700,skyColor:'#182640',hemiSkyColor:'#dbeafe',hemiGroundColor:'#263854',hemiIntensity:1.7,sunColor:'#fff0cf',sunIntensity:2.1,sunX:-7,sunY:16,sunZ:9,cameraX:0,cameraY:1.6,cameraZ:6,cameraFov:80,landscapeCameraX:0,landscapeCameraY:1.6,landscapeCameraZ:6,landscapeCameraFov:52,lookAtX:0,lookAtY:1.5,lookAtZ:-4,introLift:0},{parentId:'fps.stage.wrap'}),
|
|
146
|
-
mesh('fps.floor','fps.stage',{primitive:'box',x:0,y:-.2,z:0,sx:24,sy:.4,sz:24,color:'#2a3c58'}),
|
|
147
|
-
mesh('fps.lane','fps.stage',{primitive:'box',x:0,y:.01,z:-1,sx:2.6,sy:.02,sz:18,color:'#385074',unlit:true}),
|
|
148
|
-
mesh('fps.wall.n','fps.stage',{primitive:'box',x:0,y:2.1,z:-11.8,sx:24,sy:4.2,sz:.6,color:'#20304a'}),
|
|
149
|
-
mesh('fps.wall.s','fps.stage',{primitive:'box',x:0,y:2.1,z:11.8,sx:24,sy:4.2,sz:.6,color:'#20304a'}),
|
|
150
|
-
mesh('fps.wall.w','fps.stage',{primitive:'box',x:-11.8,y:2.1,z:0,sx:.6,sy:4.2,sz:24,color:'#243552'}),
|
|
151
|
-
mesh('fps.wall.e','fps.stage',{primitive:'box',x:11.8,y:2.1,z:0,sx:.6,sy:4.2,sz:24,color:'#243552'}),
|
|
152
|
-
mesh('fps.trim.n','fps.stage',{primitive:'box',x:0,y:3.9,z:-11.45,sx:23,sy:.18,sz:.14,color:'#38bdf8',unlit:true}),
|
|
153
|
-
...boxWall('fps.pillar.nw',-6.0,-2.6,1.5,3.2,1.5),
|
|
154
|
-
...boxWall('fps.pillar.ne',6.0,-2.6,1.5,3.2,1.5),
|
|
155
|
-
...boxWall('fps.pillar.sw',-6.4,2.4,1.5,2.4,1.5),
|
|
156
|
-
...boxWall('fps.pillar.se',6.4,2.4,1.5,2.4,1.5),
|
|
157
|
-
// First-person 3D camera-mounted blaster
|
|
158
|
-
mesh('fps.gun','fps.stage',{primitive:'group',x:.19,y:-.21,z:-.58,rx:.04,ry:-.12,attachToCamera:true}),
|
|
159
|
-
mesh('fps.gun.body','fps.gun',{primitive:'box',x:0,y:0,z:0,sx:.12,sy:.13,sz:.46,color:'#28354a'}),
|
|
160
|
-
mesh('fps.gun.rail','fps.gun',{primitive:'box',x:0,y:.075,z:-.04,sx:.05,sy:.035,sz:.34,color:'#38bdf8',unlit:true}),
|
|
161
|
-
mesh('fps.gun.muzzle','fps.gun',{primitive:'cylinder',x:0,y:.01,z:-.28,rx:1.5708,sx:.16,sy:.14,sz:.16,radiusTop:.22,radiusBottom:.22,color:'#f2b544',unlit:true}),
|
|
162
|
-
// Enemy security drone 3D prototype
|
|
163
|
-
mesh('fps.drone','fps.stage',{primitive:'group',x:0,y:1.55,z:-3},{prototype:true}),
|
|
164
|
-
mesh('fps.drone.core','fps.drone',{primitive:'sphere',x:0,y:0,z:0,sx:1.15,sy:1.15,sz:1.15,radiusTop:.55,color:'#ef5b4c'}),
|
|
165
|
-
mesh('fps.drone.visor','fps.drone',{primitive:'box',x:0,y:.06,z:.46,sx:.68,sy:.24,sz:.22,color:'#172033'}),
|
|
166
|
-
mesh('fps.drone.eye','fps.drone',{primitive:'box',x:0,y:.06,z:.58,sx:.34,sy:.12,sz:.08,color:'#ffe66d',unlit:true}),
|
|
167
|
-
mesh('fps.drone.wing.l','fps.drone',{primitive:'box',x:-.78,y:0,z:0,sx:.36,sy:.16,sz:.64,color:'#3b4e6e'}),
|
|
168
|
-
mesh('fps.drone.wing.r','fps.drone',{primitive:'box',x:.78,y:0,z:0,sx:.36,sy:.16,sz:.64,color:'#3b4e6e'}),
|
|
169
|
-
behavior('fps.drone.state','fps.drone','instance-state',{hp:2,maxHp:2,value:1,tag:'drone',team:'enemy'}),
|
|
170
|
-
behavior('fps.drone.steer','fps.drone','steer-3d',{mode:'chase-camera',speed:.55,stopDistance:4.2,faceCamera:true,boundsX:10.5,boundsZ:10.5}),
|
|
171
|
-
// 2D HUD, crosshair, virtual aim joystick, and FIRE control
|
|
172
|
-
group('fps.hud',0,0,390,150),layout('fps.hud',155,0),
|
|
173
|
-
uiText('fps.title','CYBER ARENA',65,24,260,38,26,{parentId:'fps.hud'}),
|
|
174
|
-
uiText('fps.kills.label','{{fps.kills}} / 3',135,64,120,30,20,{parentId:'fps.hud'}),
|
|
175
|
-
group('fps.reticle',177,332,36,36),layout('fps.reticle',332,177),
|
|
176
|
-
component('fps.reticle.h','native.rectangle.v1',{width:24,height:3,fill:'#ffe66d',strokeWidth:0,radius:2},{parentId:'fps.reticle',transform:[1,0,0,1,6,16.5]}),
|
|
177
|
-
component('fps.reticle.v','native.rectangle.v1',{width:3,height:24,fill:'#ffe66d',strokeWidth:0,radius:2},{parentId:'fps.reticle',transform:[1,0,0,1,16.5,6]}),
|
|
178
|
-
group('fps.joy.wrap',18,504,152,152),layout('fps.joy.wrap',52,212),
|
|
179
|
-
component('fps.joy','native.group.v1',{width:152,height:152},{parentId:'fps.joy.wrap'}),
|
|
180
|
-
behavior('fps.joy.stick','fps.joy','virtual-joystick',{mode:'fixed',radiusPx:54,deadZone:0,drawControl:true,baseColor:'#ffffff38',knobColor:'#ffe66dee'}),
|
|
181
|
-
behavior('fps.controller','fps.stage','fps-controller-3d',{x:0,y:1.6,z:6,yaw:0,pitch:0,minYaw:-.85,maxYaw:.85,minPitch:-.42,maxPitch:.45,moveSpeed:0,lookSensitivity:.0055,playerRadius:.5,boundsX:11,boundsZ:11,aimJoystickBehaviorId:'fps.joy.stick',aimMode:'delta',lookMode:'drag',bobAmplitude:0}),
|
|
182
|
-
group('fps.fire.wrap',228,552,138,68),layout('fps.fire.wrap',520,256),
|
|
183
|
-
component('fps.fire','native.button.v1',{width:138,height:68,fill:'#f2b544',hoverFill:'#ffe66d',pressedFill:'#d88b32',stroke:'#182640',strokeWidth:4,radius:12,presentation:'shiny-cta'},{parentId:'fps.fire.wrap'}),
|
|
184
|
-
uiText('fps.fire.label','FIRE',8,12,122,44,24,{parentId:'fps.fire'}),
|
|
185
|
-
group('fps.audio',0,0,1,1,{parameters:{width:1,height:1,visible:false}}),
|
|
186
|
-
{kind:'putVariable',variable:{id:'fps.kills',label:'Kills',type:'number',initial:0}},
|
|
187
|
-
binding('fps.start',{kind:'sceneEnter',sceneId:'scene.play'},[
|
|
188
|
-
{kind:'spawnAt3d',prototypeId:'fps.drone',x:0,y:1.6,z:-2.2,count:1},
|
|
189
|
-
{kind:'spawnAt3d',prototypeId:'fps.drone',x:-3.8,y:2.1,z:-3.6,count:1},
|
|
190
|
-
{kind:'spawnAt3d',prototypeId:'fps.drone',x:3.8,y:1.3,z:-3.6,count:1},
|
|
191
|
-
{kind:'playAudio',behaviorId:'fps.ambient.sound'},
|
|
192
|
-
]),
|
|
193
|
-
binding('fps.joy.audio',{kind:'joystickStart',componentId:'fps.joy'},[{kind:'playAudio',behaviorId:'fps.ambient.sound'}]),
|
|
194
|
-
binding('fps.shoot',{kind:'click',componentId:'fps.fire'},[
|
|
195
|
-
{kind:'raycast3d',stageId:'fps.stage',mode:'crosshair',maxDistance:60,targetTeam:'enemy'},
|
|
196
|
-
{kind:'cameraShake',intensity:3,seconds:.09},
|
|
197
|
-
{kind:'screenFlash',color:'#ffe66d',opacity:.12,seconds:.08},
|
|
198
|
-
{kind:'playAudio',behaviorId:'fps.fire.sound'},
|
|
199
|
-
]),
|
|
200
|
-
binding('fps.hit',{kind:'raycastHit3d',componentId:'fps.drone'},[
|
|
201
|
-
{kind:'modifyInstanceState',target:'self',componentId:'fps.drone',field:'hp',op:'sub',value:1},
|
|
202
|
-
{kind:'floatingText',componentId:'fps.drone',text:'HIT!',color:'#ffe66d',fontSize:26,risePx:44,seconds:.45},
|
|
203
|
-
{kind:'playAudio',behaviorId:'fps.hit.sound'},
|
|
204
|
-
]),
|
|
205
|
-
binding('fps.kill',{kind:'instanceDepleted',componentId:'fps.drone'},[
|
|
206
|
-
{kind:'add',variableId:'fps.kills',value:1},
|
|
207
|
-
{kind:'despawn',target:'self'},
|
|
208
|
-
]),
|
|
209
|
-
binding('fps.win',{kind:'variableChange',variableId:'fps.kills'},[{kind:'changeScene',sceneId:'scene.win'}],{variableId:'fps.kills',op:'gte',value:3}),
|
|
210
|
-
// Victory end card with live 3D arena diorama
|
|
211
|
-
{kind:'createScene',scene:{id:'scene.win',label:'Arena cleared',role:'end-card'}},
|
|
212
|
-
group('fps.end.stage.wrap',0,0,390,700,{sceneId:'scene.win',order:-10}),layout('fps.end.stage.wrap',0,0,700/390,390/700),
|
|
213
|
-
component('fps.end.stage','native.stage3d.v1',{width:390,height:700,skyColor:'#182640',hemiSkyColor:'#dbeafe',hemiGroundColor:'#263854',hemiIntensity:1.8,sunColor:'#fff0cf',sunIntensity:2.2,sunX:-6,sunY:14,sunZ:8,cameraX:0,cameraY:3.4,cameraZ:8.4,cameraFov:52,landscapeCameraX:2.2,landscapeCameraY:3.0,landscapeCameraZ:7.8,landscapeCameraFov:38,lookAtX:0,lookAtY:.65,lookAtZ:0,introLift:0},{sceneId:'scene.win',parentId:'fps.end.stage.wrap'}),
|
|
214
|
-
mesh('fps.end.floor','fps.end.stage',{primitive:'box',x:0,y:-.2,z:0,sx:16,sy:.4,sz:16,color:'#2a3c58'},{sceneId:'scene.win'}),
|
|
215
|
-
mesh('fps.end.pedestal','fps.end.stage',{primitive:'cylinder',x:0,y:.35,z:0,sx:1.4,sy:.7,sz:1.4,radiusTop:.9,radiusBottom:1.05,color:'#385074'},{sceneId:'scene.win'}),
|
|
216
|
-
mesh('fps.end.trophy','fps.end.stage',{primitive:'sphere',x:0,y:1.95,z:0,sx:1.3,sy:1.3,sz:1.3,radiusTop:.65,color:'#f2b544'},{sceneId:'scene.win'}),
|
|
217
|
-
mesh('fps.end.visor','fps.end.stage',{primitive:'box',x:0,y:2.02,z:.68,sx:.72,sy:.24,sz:.2,color:'#182640'},{sceneId:'scene.win'}),
|
|
218
|
-
mesh('fps.end.eye','fps.end.stage',{primitive:'box',x:0,y:2.02,z:.80,sx:.36,sy:.12,sz:.08,color:'#38bdf8',unlit:true},{sceneId:'scene.win'}),
|
|
219
|
-
mesh('fps.end.ring','fps.end.stage',{primitive:'ring',x:0,y:.05,z:0,rx:-1.5708,innerRadius:1.4,radiusTop:1.75,color:'#38bdf8',unlit:true,doubleSide:true},{sceneId:'scene.win'}),
|
|
220
|
-
group('fps.end.ui',0,455,390,210,{sceneId:'scene.win'}),layout('fps.end.ui',310,105,.88),
|
|
221
|
-
uiText('fps.end.title','ARENA CLEARED',20,0,350,50,30,{parentId:'fps.end.ui',sceneId:'scene.win'}),
|
|
222
|
-
component('fps.end.cta','native.button.v1',{width:260,height:74,fill:'#f2b544',hoverFill:'#ffe66d',pressedFill:'#d88b32',stroke:'#182640',strokeWidth:4,radius:12,presentation:'shiny-cta'},{parentId:'fps.end.ui',sceneId:'scene.win',transform:[1,0,0,1,65,72]}),
|
|
223
|
-
uiText('fps.end.cta.label','DEPLOY NOW',10,8,240,56,26,{parentId:'fps.end.cta',sceneId:'scene.win'}),
|
|
224
|
-
behavior('fps.end.cta.float','fps.end.cta','animation',{property:'y',from:72,to:64,seconds:.8,loop:true,fromCurrent:false,delay:0,easing:'ease-in-out'}),
|
|
225
|
-
behavior('fps.end.confetti','fps.end.ui','emitter',{count:36,color:'#ffe66d',color2:'#38bdf8',color3:'#ef5b4c',speed:160,lifetime:.9,gravity:220,spread:360,shape:'confetti',coverage:'screen',origin:'center',direction:-90}),
|
|
226
|
-
binding('fps.end.enter',{kind:'sceneEnter',sceneId:'scene.win'},[{kind:'animate',behaviorId:'fps.end.cta.float'},{kind:'emit',behaviorId:'fps.end.confetti'},{kind:'playAudio',behaviorId:'fps.win.sound'}]),
|
|
227
|
-
binding('fps.end.store',{kind:'click',componentId:'fps.end.cta'},[{kind:'store'}]),
|
|
228
|
-
];
|
|
229
|
-
for(const [id,assetId,role,bus,loop,volume] of [['ambient','fps.ambient','ambient','music',true,.12],['fire','fps.fire.art','tap','sfx',false,.3],['hit','fps.hit.art','match','sfx',false,.35],['win','fps.win.art','win','stinger',false,.45]])ops.push(component('fps.audio.'+id,'native.group.v1',{width:1,height:1,visible:false},{parentId:'fps.audio',assetSlots:[{slotId:'source',assetId}]}),audio('fps.'+id+'.sound','fps.audio.'+id,role,bus,loop,volume));
|
|
230
|
-
const project=applyOperations(emptyProject({id:'fps-arena-proof',name:'Cyber Arena 3D',androidUrl:'https://play.google.com/store/apps/details?id=com.tora.cyberarena'}),[...records.map(asset=>({kind:'registerAsset',asset})),...ops]).project;
|
|
231
|
-
return {project,assets};
|
|
134
|
+
return createSkyBlasterProject('fps-arena-proof');
|
|
232
135
|
}
|
|
233
136
|
|
|
234
137
|
async function main(){
|