eva-engine / eva.js

Eva.js is a front-end game engine specifically for creating interactive game projects.
https://eva.js.org
MIT License
1.75k stars 108 forks source link

fix: load no extension file error. #1

Closed fanmingfei closed 3 years ago

fanmingfei commented 3 years ago

Please check if the PR fulfills these requirements

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

Bug fix

What is the current behavior? (You can also link to an open issue here)

Load an image no have extension, it will be load with xhr.

What is the new behavior (if this is a feature change)?

Use the resource config type property.

const resource = [{
  name: 'resourceName',
  src: {
    image: {
      type: 'png',
      src: 'https://xxxxxx.xxxx.xxx/xxxx'
    }
  }
}]

Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)

No

Other information: