{"action":"opened","issue":{"url":"https://api.github.com/repos/melonjs/melonJS/issues/984","repository_url":"https://api.github.com/repos/melonjs/melonJS","labels_url":"https://api.github.com/repos/melonjs/melonJS/issues/984/labels{/name}","comments_url":"https://api.github.com/repos/melonjs/melonJS/issues/984/comments","events_url":"https://api.github.com/repos/melonjs/melonJS/issues/984/events","html_url":"https://github.com/melonjs/melonJS/issues/984","id":545001683,"node_id":"MDU6SXNzdWU1NDUwMDE2ODM=","number":984,"title":"Creating atlas through code","user":{"login":"devnewton","id":1859457,"node_id":"MDQ6VXNlcjE4NTk0NTc=","avatar_url":"https://avatars3.githubusercontent.com/u/1859457?v=4","gravatar_id":"","url":"https://api.github.com/users/devnewton","html_url":"https://github.com/devnewton","followers_url":"https://api.github.com/users/devnewton/followers","following_url":"https://api.github.com/users/devnewton/following{/other_user}","gists_url":"https://api.github.com/users/devnewton/gists{/gist_id}","starred_url":"https://api.github.com/users/devnewton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devnewton/subscriptions","organizations_url":"https://api.github.com/users/devnewton/orgs","repos_url":"https://api.github.com/users/devnewton/repos","events_url":"https://api.github.com/users/devnewton/events{/privacy}","received_events_url":"https://api.github.com/users/devnewton/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2020-01-03T13:52:30Z","updated_at":"2020-01-03T13:52:30Z","closed_at":null,"author_association":"NONE","body":"I try to figure how to use some spritesheet ( like https://jb3.devnewton.fr/pasted/2da929eb-8783-4162-87a2-80ac4350ab81.jpg ).\r\n\r\nIs it possible to define the atlas manually? Melonjs documentation only talk about Texture Packer or Shoebox.\r\n\r\nI tried this:\r\n\r\n```\r\n        let atlas = {\r\n            \"meta\": {\r\n                \"app\": \"melonJS\",\r\n                \"size\": {\"w\": 512, \"h\": 512},\r\n                \"repeat\": \"no-repeat\",\r\n                \"image\": \"sara\"\r\n            },\r\n            \"frames\": [{\r\n                    \"filename\": \"stand\",\r\n                    \"frame\": {\"x\": 1, \"y\": 1, \"w\": 32, \"h\": 48}\r\n                }]\r\n        };\r\n\r\n       let texture = new me.video.renderer.Texture(\r\n                atlas,\r\n                me.loader.getImage(\"sara\")\r\n                );\r\n        this.renderable = new me.Sprite(0, 0, {image: texture});\r\n        this.renderable.addAnimation(\"stand\", [{ name: \"stand\", delay: Infinity }]);\r\n        this.setCurrentAnimation(\"stand\");\r\n```\r\n\r\nBut it is not detected as an atlas:\r\n\r\n> string parameters for addAnimation are not allowed for standard spritesheet based Texture"}}
{"actor":{"display_login":"devnewton"}}