Skip to content

Commit

Permalink
fix link to melonJS
Browse files Browse the repository at this point in the history
  • Loading branch information
obiot committed Sep 29, 2023
1 parent 8d9f204 commit 42b8062
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion graphics/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<!-- script -->
<script type="module">

import * as me from './../../melonJS/build/melonjs.module.js'
import * as me from "https://cdn.jsdelivr.net/npm/melonjs/+esm";

me.device.onReady(function onReady() {
// Initialize the video.
Expand Down
3 changes: 2 additions & 1 deletion masking/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
<div id="screen"></div>
<!-- script -->
<script type="module">
import * as me from './../../melonJS/build/melonjs.module.js'
import * as me from "https://cdn.jsdelivr.net/npm/melonjs/+esm";

// upon device ready
me.device.onReady(function () {
// Initialize the video (force canvas renderer as we are using system font later)
Expand Down
8 changes: 4 additions & 4 deletions sprite/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
<div id="screen"></div>
<!-- script -->
<script type="module">
import * as me from './../../melonJS/build/melonjs.module.js';

import * as me from "https://cdn.jsdelivr.net/npm/melonjs/+esm";
me.device.onReady(function () {
// Initialize the video.
if (!me.video.init(1218, 562, {parent : "screen", scaleMethod : "flex", renderer : me.video.CANVAS})) {
Expand Down Expand Up @@ -52,15 +52,15 @@
image : "monster",
anchorPoint : new me.Vector2d(0.5, 0.5)
});
left_sprite.scale(0.5);
left_sprite.scale(0.25);

var right_sprite = new me.Sprite(
me.game.viewport.width / 2 + 125,
me.game.viewport.height / 2, {
image : "monster",
anchorPoint : new me.Vector2d(0.5, 0.5)
});
right_sprite.scale(1.25);
right_sprite.scale(0.75);

// add a gray background layer
me.game.world.addChild(new me.ColorLayer("background", "#202020"));
Expand Down

0 comments on commit 42b8062

Please sign in to comment.