{"id":19210798,"url":"https://github.com/flekschas/piling.js-svelte","last_synced_at":"2026-05-12T20:46:11.651Z","repository":{"id":83153468,"uuid":"276781655","full_name":"flekschas/piling.js-svelte","owner":"flekschas","description":"Template for using piling.js in a svelte app","archived":false,"fork":false,"pushed_at":"2020-09-19T22:02:48.000Z","size":47,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-04T16:45:22.095Z","etag":null,"topics":["pilingjs","rollup","svelte"],"latest_commit_sha":null,"homepage":"https://flekschas.github.io/piling.js-svelte/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flekschas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-03T01:42:17.000Z","updated_at":"2022-10-03T17:23:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"e0fab2d8-83fe-491d-80d3-87b5696713d5","html_url":"https://github.com/flekschas/piling.js-svelte","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flekschas%2Fpiling.js-svelte","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flekschas%2Fpiling.js-svelte/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flekschas%2Fpiling.js-svelte/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flekschas%2Fpiling.js-svelte/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flekschas","download_url":"https://codeload.github.com/flekschas/piling.js-svelte/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240283828,"owners_count":19776939,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["pilingjs","rollup","svelte"],"created_at":"2024-11-09T13:38:04.768Z","updated_at":"2025-11-13T20:01:19.521Z","avatar_url":"https://github.com/flekschas.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Piling.js Svelte Template with Rollup\n\nThis template demonstrates how [piling.js](https://github.com/flekschas/piling.js) can be used within a [Svelte](https://svelte.dev/) app.\n\n**Live Demo:** https://flekschas.github.io/piling.js-svelte/\n\n## Getting Started\n\n```\ngit clone https://github.com/flekschas/piling.js-svelte\ncd piling.js-svelte\nnpm install\nnpm run dev\n```\n\n## How To\n\nEverything works as expected except for one thing: you must import Piling.js from `src/piling.js` instead of a node module. Hence, do the following (pay attention to the `./` that preceds `piling.js`):\n\n```javascript\nimport createPiling from './piling.js';\n```\n\ninstead of \n\n```javascript\nimport createPiling from 'piling.js';\n```\n\n#### Why?\n\n[Piling.js](https://github.com/flekschas/piling.js) uses [PixiJS](https://github.com/pixijs) for WebGL rendering. Unfortunately, PixiJS cannot be bundled with Rollup. (Or at least I haven't found out how...) However, Svelte apps are typically bundled with Rollup. Therefore, we cannot directly import Piling.js within our Svelte app as that would subsequently import PixiJS, which fails. To circumvent this issue, we are loading Piling.js from unpkg prior to loading the bundled Svelte app. In `src/piling.js`, we then expose the global exports from Piling.js to mimic the export from the Piling.js node modules.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflekschas%2Fpiling.js-svelte","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflekschas%2Fpiling.js-svelte","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflekschas%2Fpiling.js-svelte/lists"}