Jump to content

Search the Community

Showing results for tags 'strage'.

  • 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
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

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 1 result

  1. Hello folks, after nearly over an hour of debug action, I found something strange. I create an object out of some smaller objects using merge. After that, I keep one "original" in background with "isVisible = false". Then, if the settings change, I throw everything away and copy this "original". Set material, size, etc... Then I create instances of this. But I always had an error within babylon while copy. The first time it works as expected. But the second time I use copy with this "original" object, I have this error: (Line 27524: CANNOT SET .references OF UNDEFINED #ERROR) for (var kind in this._vertexBuffers) { if (numOfMeshes === 1) { this._vertexBuffers[kind].create(); } this._vertexBuffers[kind]._buffer.references = numOfMeshes; <==== CANNOT SET .references OF UNDEFINED #ERROR if (kind === BABYLON.VertexBuffer.PositionKind) { mesh._resetPointsArrayCache(); var extend = BABYLON.Tools.ExtractMinAndMax(this._vertexBuffers[kind].getData(), 0, this._totalVertices); mesh._boundingInfo = new BABYLON.BoundingInfo(extend.minimum, extend.maximum); mesh._createGlobalSubMesh(); //bounding info was just created again, world matrix should be applied again. mesh._updateBoundingInfo(); }}I noticed, that after copy, in Mesh._geometry._meshes a mesh had been added. This happend in the new copy as well as in the original one. That's the reason the second round it has "numOfMeshes = 2" and runs into this error. I have no idea why this happens or why the orignial mesh is affected by copy function? I ended up with this (ugly) workaround: function getBarType2() { var Clone = window.BarType2.clone("Pfosten Typ 2"); window.BarType2._geometry._meshes.pop(); Clone.isVisible = true; return Clone;}With this, it works as expected! Can anyone explain what happens here? Have a nice day Kevin
×
×
  • Create New...