Jump to content

crossorigin for mask in PIXI


maxouni
 Share

Recommended Posts

Hi.

 

I using PIXI for add on websait video with mask.

 

Mask in base 64 stored in the same domain as the Library.

 

but safari output error http://prntscr.com/9dzhrw

 

code:

    if (this.type_ == 'video') {      this.texture_ = PIXI.Texture.fromVideo(this.obj_);    } else {      this.texture_ = PIXI.Texture.fromImage(this.obj_.src, true);    }    this.sprite_ = new PIXI.Sprite(this.texture_);    if (this.mask_) {      /**       * @type {PIXI.Sprite}       * @private       */      var mask = PIXI.Sprite.fromImage(this.mask_, true);      mask.width = this.render_.width;      mask.height = this.render_.height;      this.sprite_.mask = mask;      this.stage_.addChild(mask);    }

How To Be?

CrossOrigin only set in PIXI.texture.FromImage 

How work  PIXI.Sprite.FromImage ?

 

 

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.

Guest
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.

Loading...
 Share

  • Recently Browsing   0 members

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