Skip to content

Commit

Permalink
🐛fix #14
Browse files Browse the repository at this point in the history
  • Loading branch information
akira-cn committed Jul 16, 2019
1 parent 75e6d14 commit f47b81a
Show file tree
Hide file tree
Showing 7 changed files with 18,773 additions and 16,561 deletions.
7 changes: 6 additions & 1 deletion app/lib/sprite-wxapp.js
Original file line number Diff line number Diff line change
Expand Up @@ -13229,6 +13229,11 @@ var ResAttr = (_class = function (_Sprite$Attr) {
texture = { id: texture, src: texture };
}

if (wx.createCanvas) {
texture.image = wx.createImage();
texture.image.src = texture.src;
}

return texture;
});

Expand Down Expand Up @@ -17599,7 +17604,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
(0, _core.registerNodeType)('layer', _layer2.default, true);
(0, _core.registerNodeType)('sprite', _sprite2.default);

var version = '1.11.6';
var version = '1.11.8';

exports.version = version;
exports.use = _core.use;
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions game/game.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// import './js/libs/weapp-adapter'
import './js/libs/symbol';
// import './js/libs/symbol';

import {Scene, Layer, Sprite} from './js/libs/sprite-wxapp';

Expand All @@ -10,7 +10,8 @@ const bglayer = scene.layer('bglayer');
// const layer = new Layer({context: canvas.getContext('2d')})
// canvas.width = 200

const s = new Sprite();
const s = new Sprite('https://p3.ssl.qhimg.com/t01d435c21276da7d3b.png');

s.attr({
size: [100, 100],
pos: [100, 100],
Expand Down
Loading

0 comments on commit f47b81a

Please sign in to comment.