Comments (5)
heya! thankyou for posting, Im not sure .json
extension is considered a valid image format?
from pixijs.
if the names were changed from textures/house/[email protected]
-> textures/house/[email protected]
do things work as expect? Thank you for checking!
from pixijs.
it looks like you are using assetpack, so I think you need to add a json resolver so pixi can tell what resolution it is
There is a small section of docs about it here
and here is the code snippet
import { Resolver, extensions, resolveTextureUrl, ResolveURLParser, ExtensionType } from 'pixi.js';
export const resolveJsonUrl = {
extension: ExtensionType.ResolveParser,
test: (value: string): boolean =>
Resolver.RETINA_PREFIX.test(value) && value.endsWith('.json'),
parse: resolveTextureUrl.parse,
} as ResolveURLParser;
extensions.add(resolveJsonUrl);
it is also interesting that this worked in v7 but not v8. I dont believe much was changed between the two versions when it comes to assets
from pixijs.
@Zyie's solution works. I think where I got side-tracked is that back when I was attempting to use assetpack with Pixi.js, after extensive debugging I realized that resolutions were not being considered because assetpack would output names such as [email protected]
instead of [email protected]
, which is the only pattern that Pixi v7 would recognize. That's why I modified assetpack to support this, but such modification may not make sense anymore in light of the ability to add a custom resolver.
It may be worth documenting whether the above approach works with both v7 and v8, or only with v8.
from pixijs.
I've added the json resolver by default now, so hopefully all is fixed
from pixijs.
Related Issues (20)
- Bug: Moving a DisplayObject to a different Container prevents the mouseout event from working reliably
- Bug: Incorrect calculation of vTextureCoord when scaling parent container HOT 1
- Bug: pointerover/pointerout fire twice when eventMode HOT 11
- Bug: BitmapText multiline and missing characters
- Bug: v8.0.0-rc.5 Culled containers are culled forever HOT 4
- Bug: Pixi 8 build with vite get warning and pixi crashes when minify is turned on HOT 2
- Bug: 8.0.0-rc.5 no longer renders sprites on Firefox HOT 2
- Bug: in docs, example for PIXI.Geometry draws a dovetail instead of a square HOT 2
- Bug: v8.0.0-rc.6 Texture.update() not working as expected
- Bug: Transparent Background doesn't work HOT 2
- Bug: When curve the text, the bounds of the text get cut off in pixijs 4.8.9 HOT 1
- Bug: Adding fill to certain Graphics with reversed normals causes lineStyle stroke to reverse inner/outer position
- Bug: 'Worker is not defined' with Pixi 7.4.0 and Node v18.17.1 HOT 15
- Bug: Incorrect Text color
- Bug: v8.0.0-rc.7 Calling Texture.update() causes texture rendering to fail HOT 2
- Bug: v8.0.0-rc.7 Exception when rendering odd-sided polygon after even-sided polygon
- Feature Request: Add Multi-Touch events HOT 4
- Bug: v8.0.0-rc.7 Canvas texture conflicts with Graphics when WebGL is used HOT 3
- Bug: v8.0.0-rc.7 iterating into a container and using removeChild causes object to to not be rendered
- Bug: v8.0.0.rc-8 Texture.update() does not update when source is resized HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pixijs.