Skip to content

Commit 4fc8443

Browse files
committed
initial commit
0 parents  commit 4fc8443

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+42570
-0
lines changed

.eslintrc.json

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
{
2+
"env": {
3+
"es2020" : true,
4+
"browser" : true,
5+
"node" : true
6+
},
7+
"parser": "@babel/eslint-parser",
8+
"parserOptions": {
9+
"ecmaVersion": 6,
10+
"sourceType": "module",
11+
"requireConfigFile": false,
12+
"babelOptions": {
13+
"plugins": [
14+
"@babel/plugin-syntax-import-assertions"
15+
]
16+
}
17+
},
18+
"plugins": ["eslint-plugin-jsdoc"],
19+
"extends": "eslint:recommended",
20+
"rules": {
21+
// http://eslint.org/docs/rules/
22+
"accessor-pairs": "error",
23+
"arrow-body-style": ["error", "as-needed"],
24+
"arrow-spacing": ["error", { "before": true, "after": true }],
25+
"block-spacing": ["error", "always"],
26+
"block-scoped-var": "error",
27+
"brace-style": ["off", "1tbs", { "allowSingleLine": true }],
28+
"camelcase": ["off", { "properties": "never" }],
29+
"comma-dangle": ["error", "never"],
30+
"comma-spacing": ["error", { "before": false, "after": true }],
31+
"comma-style": ["error", "last"],
32+
"constructor-super": "error",
33+
"curly": ["error", "multi-line"],
34+
"dot-location": ["error", "property"],
35+
"eol-last": "error",
36+
"eqeqeq": ["error", "allow-null"],
37+
"func-call-spacing": ["error", "never"],
38+
"handle-callback-err": ["error", "^(err|error)$" ],
39+
"indent": ["off", 4],
40+
"key-spacing": ["off", { "beforeColon": false, "afterColon": true }],
41+
"keyword-spacing": ["error", { "before": true, "after": true }],
42+
"new-cap": ["error", { "newIsCap": true, "capIsNew": false }],
43+
"new-parens": "error",
44+
"no-array-constructor": "error",
45+
"no-caller": "error",
46+
"no-class-assign": "error",
47+
"no-constructor-return": "error",
48+
"no-duplicate-imports": "error",
49+
"no-dupe-class-members": "error",
50+
"no-eval": "error",
51+
"no-extend-native": "error",
52+
"no-extra-bind": "error",
53+
"no-extra-parens": ["error", "functions"],
54+
"no-floating-decimal": "error",
55+
"no-implied-eval": "error",
56+
"no-implicit-coercion": "off",
57+
"no-implicit-globals": "error",
58+
"no-import-assign": "error",
59+
"no-iterator": "error",
60+
"no-label-var": "error",
61+
"no-labels": ["error", { "allowLoop": false, "allowSwitch": false }],
62+
"no-lone-blocks": "error",
63+
"no-loss-of-precision": "error",
64+
"no-mixed-spaces-and-tabs": "error",
65+
"no-multi-spaces": ["off", { "ignoreEOLComments": true }],
66+
"no-multi-str": "error",
67+
"no-multiple-empty-lines": ["off", { "max": 1 }],
68+
"no-native-reassign": "error",
69+
"no-negated-in-lhs": "error",
70+
"no-new": "error",
71+
"no-new-func": "error",
72+
"no-new-object": "error",
73+
"no-new-native-nonconstructor": "error",
74+
"no-new-require": "error",
75+
"no-new-wrappers": "error",
76+
"no-octal-escape": "error",
77+
"no-path-concat": "error",
78+
"no-proto": "error",
79+
"no-prototype-builtins": "off",
80+
"no-return-assign": ["error", "except-parens"],
81+
"no-self-compare": "error",
82+
"no-sequences": "off",
83+
"no-tabs": "error",
84+
"no-template-curly-in-string": "off",
85+
"no-this-before-super": "error",
86+
"no-throw-literal": "off",
87+
"no-trailing-spaces": "error",
88+
"no-undef-init": "error",
89+
"no-unmodified-loop-condition": "error",
90+
"no-unneeded-ternary": ["off", { "defaultAssignment": false }],
91+
"no-unreachable": "error",
92+
"no-unused-vars" : ["error", { "args": "after-used" }],
93+
"no-unused-private-class-members": "error",
94+
"no-useless-call": "off",
95+
"no-useless-computed-key": "error",
96+
"no-useless-constructor": "error",
97+
// used in RegExp
98+
"no-useless-escape" : "off",
99+
"no-useless-rename": "error",
100+
"no-whitespace-before-property": "error",
101+
"object-property-newline": ["error", { "allowMultiplePropertiesPerLine": true }],
102+
"one-var": ["off", { "initialized": "never" }],
103+
"operator-linebreak": ["off", "after", { "overrides": { "?": "before", ":": "before" } }],
104+
"padded-blocks": ["off", "never"],
105+
"prefer-arrow-callback" : "error",
106+
"quotes": ["error", "double", { "avoidEscape": true, "allowTemplateLiterals": true }],
107+
"rest-spread-spacing": ["error", "never"],
108+
"semi": ["error", "always"],
109+
"semi-spacing": ["error", { "before": false, "after": true }],
110+
"space-before-blocks": ["error", "always"],
111+
"space-before-function-paren": ["off", "always"],
112+
"space-in-parens": "off", // ["error", "never"],
113+
"space-infix-ops": "off",
114+
"space-unary-ops": ["off", { "words": true, "nonwords": false }],
115+
"spaced-comment": ["off", "always", { "line": { "markers": ["*package", "!", ","] }, "block": { "balanced": true, "markers": ["*package", "!", ","], "exceptions": ["*"] } }],
116+
"template-curly-spacing": ["error", "never"],
117+
"unicode-bom": ["error", "never"],
118+
"valid-typeof": ["error", { "requireStringLiterals": true }],
119+
"yield-star-spacing": ["error", "both"],
120+
"yoda": ["error", "never"],
121+
"jsdoc/require-hyphen-before-param-description": 1
122+
}
123+
}

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Temp files
2+
.DS_Store
3+
Thumbs.db
4+
Desktop.ini
5+
npm-debug.log
6+
7+
# Project specific ignore
8+
node_modules/
9+
package-lock.json

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Changelog
2+
3+
## 1.0.0 - _2023-08-16_
4+
5+
initial release

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (C) 2011 - 2023 Olivier Biot (AltByte Pte Ltd)
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# melonJS Spine Plugin
2+
3+
a [Spine](http://en.esotericsoftware.com/spine-in-depth) 4.1 plugin implementation for [melonJS 2](www.melonjs.org)
4+
5+
![melonjs-spine-gif](https://github.com/melonjs/spine-plugin/assets/4033090/e4f1db3e-e2c7-4d18-9d80-b42fc9897c59)
6+
7+
>Note: although functional, this plugin is still a work in progress. Feedback and especially contributions are welcome!
8+
9+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/melonjs/es6-boilerplate/blob/master/LICENSE)
10+
[![NPM Package](https://img.shields.io/npm/v/@melonjs/spine-plugin)](https://www.npmjs.com/package/@melonjs/spine-plugin)
11+
[![jsDeliver](https://data.jsdelivr.com/v1/package/npm/@melonjs/spine-plugin/badge?style=rounded)](https://www.jsdelivr.com/package/npm/@melonjs/spine-plugin)
12+
13+
14+
Installation
15+
-------------------------------------------------------------------------------
16+
this plugin is already bundled with the require Spine runtime, so there is no need to install it separately.
17+
>Note: this plugin requires melonJS version 15.9 or higher.
18+
19+
To install the plugin using npm :
20+
`$ [sudo] npm install @melonjs/spine-plugin`
21+
22+
Then import and use the plugin in your project. For example:
23+
```JavaScript
24+
import * as Spine from '@melonjs/spine-plugin';
25+
26+
// load assets
27+
Spine.assetManager.setPrefix("data/spine/")
28+
Spine.assetManager.loadAsset("alien.atlas", "alien-ess.json");
29+
30+
// create new Spine Renderable
31+
export default class AlienSpine extends Spine {
32+
constructor(x, y, settings ){
33+
super(x, y, settings);
34+
...
35+
}
36+
}
37+
```
38+
39+
for more details, see a complete usage example in the [test](test) folder
40+
41+
Questions, need help ?
42+
-------------------------------------------------------------------------------
43+
If you need technical support, you can contact us through the following channels :
44+
* Forums: with melonJS 2 we moved to a new discourse [forum](https://melonjs.discourse.group), but we can still also find the previous one [here](http://www.html5gamedevs.com/forum/32-melonjs/)
45+
* Chat: come and chat with us on [discord](https://discord.gg/aur7JMk), or [gitter](https://gitter.im/melonjs/public)
46+
* we tried to keep our [wikipage](https://github.com/melonjs/melonJS/wiki) up-to-date with useful links, tutorials, and anything related melonJS.

0 commit comments

Comments
 (0)