Comments (7)
This is more of an extension issue. But could you clarify: are you asking to have the graphics draw commands be inline rather than in an external file?
The reason I set it up this way was because I wanted to make the output more modifiable/readable. Mixing in the graphic draws makes the output much more noisy... this is how the CreateJS output works and I never really liked it. The current setup treats vector graphics very similar to Textures and Spritesheets.
Could you describe your use-case more? What advantage would this have?
from animate.
Thanks, I should have started with my use case. We're learning about pixi-animate and the extension and so I understand we might not be using it correctly.
We're porting a flash app to html5 with pixi. We're trying to keep the look and feel of the new app close to the original flash app. We have a few simple static assets such as buttons, icons, etc that we want to use as close to 'vector' like as possible, ie we want to be able to scale and resize them easily without the blurriness that comes from rasterizing. Currently we export them to a png sprite sheet with multiple sizes for various zoom levels, but we're evaluating if we can make them sharper (and reduce download size to the client) by exporting them as pixi graphics objects that it draws on the fly.
My use case is this: The app is written in React, so we want the output to be consumable by webpack. Currently the examples all expect the output js to be imported as <script>
's in the html, so I wanted to see if I could remove that restriction. By making it one file I hoped to just modify the output js so it would follow CommonJS module syntax, ie module.exports = <thing being exported>
and just import it into the other file using require
. Now I don't see a clear way to do this.
If you have any suggestions I would be glad to hear them.
from animate.
In the publish settings in the PixiAnimate formatted FLA, there's an option to make output CommonJS compatible, which adds the module.exports
business.
from animate.
from animate.
Stuck with Uncaught TypeError: Super expression must either be null or a function, not undefined'.
I was unable to get this to work. const animate = require('pixi-animate')
fails with the above error.
We're not using typescript, if that helps. Just regular es6, which is transpiled down to es5.
from animate.
I was unable to reproduce this error. Could you please provide more information, or a repo which demonstrates this problem? Also, please provide the version of Node (node -v
) you're running.
from animate.
My issues turned out to be version issues. I was using the wrong version of pixi for the library. We're stuck at pixi v4.3.0 for the moment, so I downgraded the pixi-animate version so that they were compatible.
from animate.
Related Issues (20)
- vuejs empty canvas HOT 2
- adobe animate will be stuck when publish,if export as Sprites Sheets is checked
- Version questions re #99 (Pixi v5 support?) HOT 2
- Uncaught TypeError: PIXI.SimplePlane is not a constructor HOT 6
- Asset conversion script - max call stack size exceeded HOT 2
- AssetConversion.js - PIXI.Graphics instance is generated twice when applied as mask and results in build error HOT 2
- shapes.txt files can't be cache busted HOT 1
- Jagged edges with graphics comming from adobe animate HOT 1
- stage = null HOT 1
- upgrade for pixi 7 HOT 2
- Syntax Error while publishing HOT 4
- pixijs.io/animate/ can not visit , the site tips 404 HOT 1
- Handle progress event during loading HOT 2
- can i use pixi-animate in pixijs ? HOT 3
- please delete
- Should I do Cleanup on ShapesCache?
- Requires PIXI error HOT 1
- Typing on MovieClip destroy() doesn't allow destroy options?
- PIXI v5 support HOT 19
- Adobe Animate 2020 API changes 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 animate.