cozyclay 3.0.2 → 3.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +28 -0
- package/dist/app/index.html +4 -4
- package/dist/assets/analytics-BibyE5ar.js +6 -0
- package/dist/assets/{app-34i-iUy1.js → app-DhRJ-PBz.js} +40 -40
- package/dist/assets/compile-worker-DqiA4AaN.js +5 -0
- package/dist/assets/{first-shot-handoff-CrGZ3n_O.js → first-shot-handoff-Qx7SKl38.js} +1 -1
- package/dist/assets/{landing-mq5bnqFE.js → landing-DYg87MDY.js} +1 -1
- package/dist/assets/scene-asset-sync-DBYQBR0T.js +20 -0
- package/dist/assets/{workflow-dUhurYUc.js → workflow-BSA22Ofr.js} +1 -1
- package/dist/cozyclay-package.json +1 -1
- package/dist/index.html +3 -3
- package/dist/workflow/index.html +3 -3
- package/package.json +1 -1
- package/src/bus-task-scopes.js +69 -0
- package/src/bus-task-targets.js +48 -0
- package/src/bus-tasks.js +175 -0
- package/src/command-bus.js +14 -39
- package/src/command-history.js +36 -0
- package/src/commands/cast.js +10 -3
- package/src/commands/motion.js +2 -1
- package/src/commands/motion3.js +10 -4
- package/src/commands/shared.js +9 -0
- package/src/motion3/compiler/anchors.js +33 -5
- package/src/motion3/compiler/compile.js +20 -3
- package/src/motion3/compiler/grip.js +9 -3
- package/src/motion3/compiler/socket-grip.js +34 -10
- package/src/motion3/docs.js +1 -1
- package/src/motion3/fix/index.js +5 -3
- package/src/motion3/pipeline.js +2 -0
- package/src/motion3/qa/spec-checks.js +12 -1
- package/src/motion3/schema/topics.js +2 -2
- package/src/motion3/schema/types.js +1 -0
- package/src/motion3/skills/basic.js +61 -13
- package/src/motion3/skills/index.js +4 -2
- package/src/motion3/skills/info.js +1 -1
- package/src/motion3/skills/reach-human.js +139 -0
- package/src/motion3/skills/stance.js +92 -0
- package/src/motion3/sockets.js +21 -4
- package/src/motion3/views.js +28 -5
- package/src/studio-app-binding.js +2 -2
- package/src/studio-error-codes.js +1 -1
- package/src/studio-motion-visual.js +4 -4
- package/tools/run-tests.mjs +1 -1
- package/dist/assets/analytics-DbKG0NgD.js +0 -6
- package/dist/assets/compile-worker-DYpa2nvO.js +0 -5
- package/dist/assets/scene-asset-sync-7J-w5oNh.js +0 -20
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as e,s as t,u as n,y as r}from"./analytics-
|
|
1
|
+
import{d as e,s as t,u as n,y as r}from"./analytics-BibyE5ar.js";var i=new Set([`fly`,`walk`,`dolly`,`orbit`,`shot`,`rail`,`play`]),a=new Set([`query`,`settings`,`landing`]);function o({surface:o,startSource:s},{now:c=()=>performance.now(),initialize:l=e,capture:u=r,optedOut:d=n}={}){let f={surface:o===`playground`?`playground`:`studio`,tutorial_version:1},p=c(),m=new Map,h=new Set,g=`fly`,_=!1,v=!1,y=!1,b=[],x=()=>(d()&&(y=!0),y&&(b=[]),!y),S=(e,t={})=>{if(!x())return;let n={...f,...t};v?u(e,n):b.push([e,n])},C=(e,t)=>{!i.has(e)||m.has(e)||(m.set(e,t),S(`tutorial:step_entered`,{step_kind:e}))};return S(`tutorial:started`,{start_source:a.has(s)?s:`settings`}),C(`fly`,p),{ready:Promise.resolve(l()).then(()=>{if(v=!0,!x())return;let e=b;b=[];for(let[t,n]of e){if(!x())break;u(t,n)}}),observe(e,n){if(_)return;let r=c();g=i.has(n)?n:null;for(let n of e)!i.has(n)||h.has(n)||(C(n,r),h.add(n),S(`tutorial:step_completed`,{step_kind:n,elapsed_bucket:t(r-m.get(n))}));C(g,r),h.size===i.size&&(_=!0,S(`tutorial:completed`,{elapsed_bucket:t(r-p)}))},dismiss(){_||(_=!0,S(`tutorial:dismissed`,{step_kind:g}))}}}var s=`cozyclay.camera-tutorial-terminal.v1`;function c(e){try{return JSON.parse((e??globalThis.localStorage)?.getItem(s)||`null`)}catch{return null}}function l(e){let t=c(e);return t?.dismissed===!0||t?.completed===!0||t?.export_started===!0}function u(e,t){try{(t??globalThis.localStorage)?.setItem(s,JSON.stringify({[e]:!0}))}catch{}}function d(e){let t=l(e);return{canShow(e){return!t&&[`shot`,`rail`,`play`].every(t=>e.has(t))},complete(){u(`completed`,e)},dismiss(){t=!0,u(`dismissed`,e)},exportStarted(){t=!0,u(`export_started`,e)}}}export{o as i,d as n,u as r,l as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./analytics-
|
|
1
|
+
import"./analytics-BibyE5ar.js";import{i as e,n as t}from"./first-shot-handoff-Qx7SKl38.js";(()=>{let n=document.getElementById(`playground`),r=document.getElementById(`try`),i=document.getElementById(`tutorial-steps`),a=document.getElementById(`tutorial-card`),o=document.getElementById(`tutorial-card-step`),s=document.getElementById(`tutorial-now`),c=document.getElementById(`tutorial-done`),l=document.getElementById(`playground-start`),u=document.getElementById(`playground-full`),d=document.getElementById(`playground-close`),f=document.getElementById(`playground-download`),p=document.getElementById(`playground-download-status`),m=document.getElementById(`playground-download-error`),h=document.getElementById(`playground-handoff-dismiss`),g=()=>matchMedia(`(min-width: 721px) and (hover: hover)`).matches,_=[`w`,`a`,`s`,`d`,`q`,`e`],v=new Set,y=[{kind:`fly`,label:`Look`,how:()=>`Right-drag to look around.`},{kind:`walk`,label:`Walk`,how:()=>`Keep the right button held and press each key once: `+_.map(e=>`<kbd data-done="${+!!v.has(e)}">${e.toUpperCase()}</kbd>`).join(` `)+`. W A S D walk, Q E crane.`},{kind:`dolly`,label:`Dolly`,how:()=>`Scroll to push in and pull out.`},{kind:`orbit`,label:`Orbit`,how:()=>`Hold <kbd>Alt</kbd> (<kbd>⌥ Option</kbd> on Mac) and left-drag to circle the character.`},{kind:`shot`,label:`Shot`,how:()=>`Click <b>+ Add shot</b> in the Shots lane below. That is your cut.`},{kind:`rail`,label:`Rail`,how:()=>`Click the shot block, then <b>Draw rail</b>, and drag a line across the map that pops up. That line is the dolly move.`},{kind:`play`,label:`Play`,how:()=>`You are looking through the shot camera now, full-screen. Press <b>▶</b> in the transport to ride your rail; <kbd>Esc</kbd> hands the view back to the free camera.`}],b=new Set,x=null,S=null,C=null,w=!1,T=!1,E=!1,D=()=>{},O=()=>{let e=n.dataset.state===`live`,t=e?y.find(e=>!b.has(e.kind)):null;e&&S?.observe(b,t?.kind??null),i.innerHTML=y.map((e,n)=>`<li data-done="${+!!b.has(e.kind)}" data-current="${+(t===e)}">${n+1} ${e.label}</li>`).join(``),a.hidden=!t||w,i.hidden=w,t&&(o.textContent=`${y.indexOf(t)+1} / ${y.length}`,s.innerHTML=t.how()),c.hidden=!(e&&!w&&(C?.canShow(b)||E)),e&&!t&&C?.complete(),x?.contentWindow?.postMessage({type:`cozyclay:playground-hint`,kind:w?null:t?.kind??null},`*`),e&&!t&&!O.reported&&(O.reported=!0,window.posthog?.capture&&window.posthog.capture(`landing:playground_tutorial_done`))};window.addEventListener(`message`,e=>{if(e.data?.type!==`cozyclay:playground-nav`||!x||e.source!==x.contentWindow||e.origin!==window.location.origin)return;let t=e.data.kind;if(!(!y.some(e=>e.kind===t)||b.has(t))){if(t===`walk`&&(typeof e.data.key==`string`&&v.add(e.data.key),!_.every(e=>v.has(e)))){O();return}b.add(t),O()}});let k=({dismiss:e=!0}={})=>{e&&S?.dismiss(),e&&x&&C?.dismiss(),C=null,T=!1,E=!1,f.disabled=!1,m.hidden=!0,p.hidden=!0,S=null,D(),x&&x.remove(),x=null,n.dataset.state=``,l.hidden=!1,r.classList.remove(`playground-live`),b.clear(),v.clear(),O()};l.addEventListener(`click`,()=>{if(!g())return;x&&k({dismiss:!1}),C=t(),w=!1,S=e({surface:`playground`,startSource:`landing`}),x=document.createElement(`iframe`),x.src=`/app/?embed=playground&scene=/scenes/city-block.cclayproject`,x.title=`CozyClay playground`,x.allow=`fullscreen; pointer-lock`,x.loading=`eager`,n.appendChild(x),n.dataset.state=`loading`,l.hidden=!0;let i=()=>{n.dataset.state===`loading`&&(D(),n.dataset.state=`live`,r.classList.add(`playground-live`),O())},a=e=>{e.data?.type===`cozyclay:playground-ready`&&e.source===x?.contentWindow&&e.origin===window.location.origin&&i()};window.addEventListener(`message`,a);let o=setTimeout(i,15e3);D=()=>{clearTimeout(o),window.removeEventListener(`message`,a)},window.posthog?.capture&&window.posthog.capture(`landing:playground_started`)}),u.addEventListener(`click`,()=>{x?.requestFullscreen&&x.requestFullscreen()}),h.addEventListener(`click`,()=>{C?.dismiss(),S?.dismiss(),w=!0,E=!1,m.hidden=!0,O()}),f.addEventListener(`click`,()=>{!x||T||(C?.exportStarted(),T=!0,E=!0,f.disabled=!0,m.hidden=!0,p.hidden=!1,p.textContent=`Preparing your edited project…`,x.contentWindow.postMessage({type:`cozyclay:playground-export`},`*`))}),window.addEventListener(`message`,e=>{if(e.data?.type!==`cozyclay:playground-export-result`||!T||!x||e.source!==x.contentWindow||e.origin!==window.location.origin)return;if(T=!1,f.disabled=!1,typeof e.data.serialized!=`string`||!e.data.serialized){p.hidden=!0,m.hidden=!1,m.textContent=`The project could not be prepared. Your edits are still here; try Download my project again.`;return}let t=new Blob([e.data.serialized],{type:`application/json`}),n=URL.createObjectURL(t),r=document.createElement(`a`);r.href=n,r.download=`city-block.cclayproject`,r.click(),setTimeout(()=>URL.revokeObjectURL(n),1e3),f.dataset.state=`copied`,E=!1,p.textContent=`Project download requested. Open city-block.cclayproject in your local Studio, then use Export.`,O(),setTimeout(()=>{f.dataset.state=``},1400),window.posthog?.capture&&window.posthog.capture(`landing:playground_scene_downloaded`)}),d.addEventListener(`click`,k),document.querySelectorAll(`button.copy[data-copy]`).forEach(e=>{e.addEventListener(`click`,async()=>{try{await navigator.clipboard.writeText(e.dataset.copy),e.dataset.state=`copied`,setTimeout(()=>{e.dataset.state=``},1400)}catch{}})}),O()})();
|