Skip to content

Commit

Permalink
update SystemJS
Browse files Browse the repository at this point in the history
  • Loading branch information
flyover committed Jan 9, 2020
1 parent 9170d46 commit 041f592
Show file tree
Hide file tree
Showing 19 changed files with 5,059 additions and 7,898 deletions.
2 changes: 1 addition & 1 deletion demo/dist/demo/atlas.js → demo/atlas.js

Large diffs are not rendered by default.

381 changes: 0 additions & 381 deletions demo/dist/demo/main.js

This file was deleted.

722 changes: 0 additions & 722 deletions demo/dist/demo/render-ctx2d.js

This file was deleted.

1,105 changes: 0 additions & 1,105 deletions demo/dist/demo/render-webgl.js

This file was deleted.

2,817 changes: 0 additions & 2,817 deletions demo/dist/spine.js

This file was deleted.

43 changes: 9 additions & 34 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,42 +5,17 @@
<meta charset="utf-8" />
<title>Spine TypeScript Demo</title>
<style>body { background-image: url("bg.png"); background-repeat: repeat; }</style>
<script type="text/javascript" src="https://unpkg.com/systemjs@0.21.3/dist/system.js"></script>
<!--script type="text/javascript" src="../node_modules/systemjs/dist/system.js"></script-->
<script type="systemjs-importmap">
{
"imports": {
"@spine": "../index.js"
}
}
</script>
<script src="https://unpkg.com/systemjs@6.1.7/dist/system.js"></script>
<script type="text/javascript">
function boot(event) {
var transpile = false;
if (transpile) {
SystemJS.config({
packages: { "typescript": { main: "lib/typescript.js", meta: { "lib/typescript.js": { exports: "ts" } } } },
// map: { "typescript": "../../node_modules/typescript", }
map: { "typescript": "https://unpkg.com/typescript@2.8.3", }
});
SystemJS.config({
packages: { "plugin-typescript": { main: "lib/plugin.js" } },
// map: { "plugin-typescript": "../../node_modules/plugin-typescript" },
map: { "plugin-typescript": "https://unpkg.com/plugin-typescript@8.0.0" },
transpiler: "plugin-typescript",
typescriptOptions: { tsconfig: true, module: "system" }
});
SystemJS.config({
packages: {
"..": { defaultExtension: "ts" },
".": { defaultExtension: "ts" }
}
});
} else {
SystemJS.config({
baseURL: "dist/demo"
});
SystemJS.config({
packages: {
"..": { defaultExtension: "js" },
".": { defaultExtension: "js" }
}
});
}
SystemJS.import("main").then(function(module) {
System.import("./main.js").then(function(module) {
module.start();
}).catch(function (error) {
console.error(error);
Expand Down
382 changes: 382 additions & 0 deletions demo/main.js

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions demo/main.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as Spine from "../spine";
import * as Atlas from "./atlas";
import { RenderCtx2D } from "./render-ctx2d";
import { RenderWebGL } from "./render-webgl";
import { mat4x4Identity, mat4x4Ortho, mat4x4Translate, mat4x4Scale } from "./render-webgl";
import * as Spine from "@spine";
import * as Atlas from "./atlas.js";
import { RenderCtx2D } from "./render-ctx2d.js";
import { RenderWebGL } from "./render-webgl.js";
import { mat4x4Identity, mat4x4Ortho, mat4x4Translate, mat4x4Scale } from "./render-webgl.js";

interface File {
path: string;
Expand Down
722 changes: 722 additions & 0 deletions demo/render-ctx2d.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions demo/render-ctx2d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as Spine from "../spine";
import * as Atlas from "./atlas";
import { mat3x3Identity, mat3x3Scale, mat3x3Transform, mat3x3ApplyAtlasPageTexcoord, mat3x3ApplyAtlasSiteTexcoord } from "./render-webgl";
import * as Spine from "@spine";
import * as Atlas from "./atlas.js";
import { mat3x3Identity, mat3x3Scale, mat3x3Transform, mat3x3ApplyAtlasPageTexcoord, mat3x3ApplyAtlasSiteTexcoord } from "./render-webgl.js";

export class RenderCtx2D {
public ctx: CanvasRenderingContext2D;
Expand Down
Loading

0 comments on commit 041f592

Please sign in to comment.