GithubHelp home page GithubHelp logo

Comments (14)

bigtimebuddy avatar bigtimebuddy commented on May 18, 2024 1

If you are bundling, try calling this method to enable deprecated settings:

http://pixijs.download/dev/docs/PIXI.html#.useDeprecated

from pixi-projection.

ivanpopelyshev avatar ivanpopelyshev commented on May 18, 2024

Interesting. Thanks, i'll check it.

from pixi-projection.

Vi-jay avatar Vi-jay commented on May 18, 2024

If you fix this problem, please let me know, thank you very much.

from pixi-projection.

K024 avatar K024 commented on May 18, 2024

I met the save problem.
Here it is.

BatchRenderer refactoring to increase performance (#6162)

PIXI.BaseTexture._id batch local field has been changed to _batchLocation

You can use PIXI.useDeprecated() as a temporary solution, or fix it in Sprite2dRenderer.

from pixi-projection.

ivanpopelyshev avatar ivanpopelyshev commented on May 18, 2024

OK, right, according to examples - it actually works with 5.2, it only produces one deprecation. Yes, I know about it , I was the one who put that deprecation there.

@Vi-jay
What does not work for you?

from pixi-projection.

Shyiy avatar Shyiy commented on May 18, 2024

For me it also doesn't work if paired with Pixi 5.2.
More specifically if I try to project the following simple sprite:

const backgroundSprite: PIXI.projection.Sprite2d = new PIXI.projection.Sprite2d(PIXI.Texture.WHITE);
backgroundSprite.tint = 0xff0000;
backgroundSprite.alpha = 0.25;

via the mapSprite method, nothing is displayed. The same code works correctly with older versions of Pixi (5.1.5).

from pixi-projection.

ivanpopelyshev avatar ivanpopelyshev commented on May 18, 2024

But but but.. it works here: https://pixijs.io/examples/?v=dev#/plugin-projection/basic.js , with dev and with 5.2.0 , just fine.

I believe pixi-projection in examples is the same as here.

How can it not work in your case?

I'm gonna publish new version in weekend but I really don't know whether it will work for you :( I really need more information.

from pixi-projection.

ivanpopelyshev avatar ivanpopelyshev commented on May 18, 2024

Do you see that deprecation in console, @Shyiy ? maybe you use pixi without deprecations somehow..

from pixi-projection.

Shyiy avatar Shyiy commented on May 18, 2024

It seems to be somehow related to imports/require.
I use parcel.js, and if I try to set up a clean project containing only the same code as in the demo at https://pixijs.io/examples/?v=v5.2.0#/plugin-projection/quad-homo.js, with on top the following to import and use PIXI and projection, then it doesn't show the projection as explained, only the 4 vertices to be dragged around. No message in the console.

import * as PIXI from "pixi.js";
globalThis.PIXI = PIXI;
import "pixi-projection";

Screenshot 2019-11-29 at 17 36 22

from pixi-projection.

ivanpopelyshev avatar ivanpopelyshev commented on May 18, 2024

try require('pixi-projection') instead.

from pixi-projection.

Shyiy avatar Shyiy commented on May 18, 2024

Enabling the deprecated settings did the trick for me and now everything works! Thank you!

from pixi-projection.

ivanpopelyshev avatar ivanpopelyshev commented on May 18, 2024

OK, special for you, I made half-cooked 3.6 that does have _id swapped to _batchLocation, thus fully compatible with 5.2 without deprecations.

If it doesn't work - try remove node_modules and package.lock and reinstall everything from scratch.
If it doesn't work again - then sorry, I we dont support your webpack configuration, that is unknown configuration, that you didnt specify, my telepathy doesn't work on it (when usually it works, seriously).

from pixi-projection.

Shyiy avatar Shyiy commented on May 18, 2024

Thanks for the quick support. That's actually not needed since as I reported before, enabling the deprecated settings makes it work correctly now.
The problem was caused by my bundler combined with myself not knowing about the http://pixijs.download/dev/docs/PIXI.html#.useDeprecated function that needed to be called to include the needed deprecations. Without calling it the pixi-projection library would just silently fail.

from pixi-projection.

ivanpopelyshev avatar ivanpopelyshev commented on May 18, 2024

Oh, good, its deprecations after all :)

from pixi-projection.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.