Jump to content

error in hosted project


Recommended Posts

Hi Team,

I have hosted one of the playground code.

Here is the link to hosted URL(i have also left the debugger so that any one can play around):



However i am getting following errors there:

Error 1:

d._cacheNode.getInnerPosToRef is not a function
    at WorldSpaceCanvas2D.Group2D._bindCacheTarget (babylon.js:94301)
    at WorldSpaceCanvas2D.Group2D.applyCachedTexture (babylon.js:93634)
    at new WorldSpaceCanvas2D (babylon.js:100564)
    at createScene (2denginescrrenspace.html:58)
    at 2denginescrrenspace.html:73

for below code:

canvas= new BABYLON.WorldSpaceCanvas2D(scene, new BABYLON.Size(200, 200), {
                id: "WorldSpaceCanvas",
                renderScaleFactor : 4
                //worldPosition: new BABYLON.Vector3(0, 0, 200),
                //worldRotation: BABYLON.Quaternion.RotationYawPitchRoll(0, 0, 0),
                //enableInteraction: true

 Error 2:

Uncaught Error: Parent renderCanvas of mainRect_58_54.1 doesn't have a valid owner!
    at Rectangle2D.Prim2DBase [as constructor] (babylon.js:89031)
    at Rectangle2D.RenderablePrim2D [as constructor] (babylon.js:92644)
    at Rectangle2D.Shape2D [as constructor] (babylon.js:93235)
    at new Rectangle2D (babylon.js:95191)
    at createBox (2denginescrrenspace.html:38)
    at flytrapdatascreenspace.js:464


for code:

var box = new BABYLON.Rectangle2D({
                id: "mainRect_"+posX+"_"+posY, parent: canvas, x: posX, y: posZ, width: sWidth, height: sDepth, 
                fill: "#404080FF", border: "#FFFFFFFF", borderThickness: 0.2,
            return box;


I have downloaded babylon js from version builder. What am i missing here?


Link to comment
Share on other sites

I think Canvas2D has to be loaded separately, along with babylon.js. Did a quick search but could only find a typescript version. Perhaps you might want to ask about loading the source for canvas2d.js. As the error is specifically about Canvas2D not working in hosted project mentioning it in the title would be worth doing.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...