Jump to content

Search the Community

Showing results for tags 'undefined'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 20 results

  1. I'm trying to se my interaction mode to true so I can set my sprite to follow my cursor. I've managed to do this before i Added ES6 and webpack. Here is a code example: import * as PIXI from 'pixi.js'; // App with width and height of the page const app = new PIXI.Application({ width: 500, height: 500, resolution: 1, backgroundColor: 0xAAAAAA, }); document.body.appendChild(app.view); let player = new PIXI.Sprite.from('assets/dirt.png'); player.anchor.set(0.5); player.x = app.view.width / 2; player.y = app.view.height / 2; app.stage.addChild(player); const movePlayer = function (e
  2. Hello everyone, currently I'm developing a small game and I want to have multiple animation sets from the same sprite sheet, they're done with aseprite. I've implemented a simple loader (in typescript), which loads all the sprite stuff correctly (json atlas), but when generating the animations it stops working if I specify the start and end properties of the configuration object, for the Scene::anims#generateFrameNames(string, object) method. Note that the error is thrown when using the animation, not when creating it! Also anim comes from a valid array of objects (As they work when
  3. I'm trying to add a bubble-pop spritesheet animation to my game. I have added other sprites fine, and when I add the sprite for the bubble, everything is still good. However, when I go to add the animations, I get an error, "Cannot read property 'add' of undefined. How can I animate the bubble? var config = { type: Phaser.AUTO, width: 1366, height: 768, parent: "canvas", scene: { preload: preload, create: create} }; var game = new Phaser.Game(config); function preload () { this.load.image('freeplayBG', 'images/freeplay-BG.png'); this.load.image('shark', 'images/nice-shark.png');
  4. hi guys, i have updated my pixi from 4.3.5 to 4.5.1, and I found there is a little change in touch event onTouchStart(e) { console.log(e.data.originalEvent.touches); // before originalEvent is TouchEvent so it has touches // new version originalEvent change to PointerEvent which does not have touches } somehow the originalEvent change from TouchEvent to PointerEvent which does not have touches, I used to detect touches to prevent multiple touches, so I have two question 1. what cause this change? 2. is there any other efficient way to limit the touches on
  5. Say I have a simple class: class SimpleGame { game: Phaser.Game; myColor: Phaser.Color; constructor() { this.myColor = Phaser.Color.createColor(255,255,0); this.game = new Phaser.Game(1200, 600, Phaser.AUTO, 'content', { preload: this.preload, create: this.create}); } preload(){ this.game.load.image("platform", "Graphics/platform.png"); } create() { console.log(this.myColor); } } window.onload = () => { var game = new SimpleGame(); }; The console always prints/returns undefined and if I try to modify the valu
  6. The previous time I worked on this project it would load no problem within the browser, now I get the error Uncaught TypeError: Cannot read property 'x' of undefined and it says it's coming from phaser.min.js:24 which isn't making sense to me. var game = new Phaser.Game(800, 600, Phaser.AUTO, '', { preload: preload, create: create, update: update }); function preload() { this.game.load.tilemap('tilemap', 'assets/tilemaps/csv/tiles.csv', null, Phaser.Tilemap.CSV); this.game.load.spritesheet('tiles', 'assets/tilemaps/tiles/snow_tiles_32.png', 32,32); this.game.load.spritesheet('
  7. Hello all, I'm trying to programmatically create a cylinder using the following: var cylinder = BABYLON.MeshBuilder.CreateCylinder("wormhole", {diameter: 1, tessellation: 24}, this.resourceStore["GameScene"]); cylinder.position = BABYLON.Vector3(-0.56, 1.27, 1.235); and it is throwing a TypeError: e is undefined with the following trace: o</i.prototype.copyFrom() babylon-2.4.min.js:1 t</i.prototype.computeWorldMatrix() babylon-2.4.min.js:6 o</i.prototype._evaluateActiveMeshes() babylon-2.4.min.js:10 o</i.prototype._renderForCamera() babylon-2.4.min.js:11 o&l
  8. Hello, I have the following error when I try to clone an object. Uncaught TypeError: Cannot set property 'references' of null What can I do? Why does this happen? Best regards Kevin
  9. I'm trying to detect collisions between sprites within the same group and use the callback function to turn them immovable: game.physics.arcade.collide(platforms, platforms, makeImmovable(), null, game); function makeImmovable(piece1, piece2){ piece1.body.immovable=true; //CRASHING HERE piece2.body.immovable=true; } It's crashing with a "Uncaught TypeError: Cannot read property "body" of undefined" on the commented line. What could it be?
  10. Hi everybody! I have a problem with a loop in my game. The problem is this: I have a loop that after certain seconds it executes and generates some sprites in the game (it takes it from a group), it works fine the first time. But after the specified seconds pass and the loop executes again it throws me this error: "Uncaught TypeError: Cannot read property 'apply' of undefined" Here's the Code (there are 3 loops in total, but for the example i just focused in the first). /Creation of the fire traps this.fireballs = game.add.group(); this.fireballs.createMultiple(100
  11. Hello, I encountered an error in "RenderingGroup.prototype.dispatch = function (subMesh)". This occured when I tried to activate shadows on a mesh. "material" is undefined in this case and produces an "needAlphaBlending of undefined" error.
  12. Hello, this is my first topic on this board. I'm coding a simple BreakOut clone in TypeScript. My app consists of a main BreakOut class and the instances for Ball, Paddle and the canvas context. BreakOut.ts /** * Created by Nomid on 20/01/2016. */ /// <reference path="GameObject.ts"/> /// <reference path="Ball.ts"/> /// <reference path="Paddle.ts"/> /// <reference path="Direction.ts"/> /// <reference path="Sprite.ts"/> /// <reference path="Key.ts"/> class BreakOut { Ball : Ball; Paddle : Paddle; private pressed_keys : { [ke
  13. Hey, I currently develop a simple game with Phaser and Javascript for a student project . I have added a "start screen" and now an error message "TypeError: an is undefined" pops up by calling the first state . It's located in the file "phaser. min. js". I already have tried to exchange this by another "phaser. min. js" file, but it still gets the mistake. Does somebody know advice? The attached file contains the js code of the first state. state1.txt
  14. I'm using phaser to make a game to have some fun and im almost finishing the game but i came across a problem thats i breaking the game and honestly i cannot fix it. I'm making a sort of Flappy Bird game to start out, and when the walls pass the screen i remove them this.walls.forEachAlive(function(wall) { if(wall.x + wall.width < game.world.bounds.left) { wall.destroy(); } });but it gives me the error: Uncaught TypeError: Cannot read property 'forEachAlive' of undefined. Any tips? thank you!
  15. Hi, I'm new in babylon.js (and the others 3d frameworks). A moment ago I exported scene from *.obj to *.babylon. Now I'm trying to load it, but im getting error: My simple code: if (BABYLON.Engine.isSupported()) { var canvas = document.getElementById("renderCanvas"); var engine = new BABYLON.Engine(canvas, true); BABYLON.SceneLoader.Load("", "/~patrol/objects/maps/city/scene.babylon", engine, function (newScene) { // Wait for textures and shaders to be ready newScene.executeWhenReady(function () { // Attach camera to canvas inp
  16. I'm working on a game and need help with an error (Uncaught TypeError: Cannot set property 'frame' of undefined) that appears when I run code inside a function. Here's the full game code, with the error at line 60: function getRandom(min, max) { return Math.floor((Math.random() * (max - (min - 1))) + min);}var game = new Phaser.Game(480, 360, Phaser.AUTO, '', { preload: preload, create: create, update: update });var colorPosition = [0, 1, 2, 3];function preload() { game.stage.disableVisibilityChange = true; game.stage.backgroundColor = '#393837'; game.load.image('collide', 'assets/collide.png
  17. Hi, I just upgraded my game to Phaser 2.1.3. (from v2.0.7) but it force some weird errors... - Especially PIXI is undefined. (I fixed that I load pixi.js to header) - biggest problem is that Pathfinder Plugin stopped working... (https://github.com/appsbu-de/phaser_plugin_pathfinding), maybe it is working but is not loaded it's loaded like this: pathfinder = game.plugins.add(Phaser.Plugin.PathFinderPlugin); Please check my screenshot, I need some advice how to fix this to work on latest version of Phaser
  18. Hi everyone, I'm a newbie in development. i'm using babylon v1.11.0 and i want to use the actionManager object but it seems undefined in the javascript source file and i didn't find it in the documentation despite of the tutorial about it . I don't know why i can't use it. Thanks in advance for your help.
  19. Hi, I recently decided to have a go at making a game (a very simple one) and have run into an error and I am now unsure what to do. I'm using version 2.0.5 and the error I get is 'TypeError: h is undefined' (In firebug it says the error is coming from phaser.min.js) My game is split into states (load, game, menu, level) I've pasted my level code into JSFiddle http://jsfiddle.net/PrZPA/ Thank you for any help and if you need more info then I'll provide it.
  20. EDIT: For those still interested in this issue I have revived it with updated code and such here. Heya, this is my first post so I apologize if this has already been covered in another relevant topic. Essentially I am setting up a HUD prototype. I pass the game object to the HUD initially then prototype all of the relevant functions afterword. I am trying to get a timer setup to essentially display a 1 minute countdown. Each time I try to run the game though I get the error... Uncaught TypeError: Cannot call method 'loop' of undefined Here is the code I am using... ~~~ HUD = func
×
×
  • Create New...