浏览代码

[ts][canvaskit] Fix headless example.

Davide Tantillo 1 周之前
父节点
当前提交
18f9bf8d71
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      spine-ts/spine-canvaskit/example/headless.js

+ 2 - 2
spine-ts/spine-canvaskit/example/headless.js

@@ -19,10 +19,10 @@ async function main() {
     if (!surface) throw new Error();
 
     // Load atlas
-    const atlas = await loadTextureAtlas(ck, __dirname + "/assets/spineboy.atlas", async (path) => fs.readFileSync(path));
+    const atlas = await loadTextureAtlas(ck, __dirname + "/../../assets/spineboy.atlas", async (path) => fs.readFileSync(path));
 
     // Load the skeleton data
-    const skeletonData = await loadSkeletonData(__dirname + "/assets/spineboy-pro.skel", atlas, async (path) => fs.readFileSync(path));
+    const skeletonData = await loadSkeletonData(__dirname + "/../../assets/spineboy-pro.skel", atlas, async (path) => fs.readFileSync(path));
 
     // Create a SkeletonDrawable
     const drawable = new SkeletonDrawable(skeletonData);