Comments (4)
Would be nice if extension would have iframe selector
from pixi-inspector.
Related #34
from pixi-inspector.
I tried to add following
<script>
window.addEventListener("load", () => {
const frame = document.getElementById("storybook-preview-iframe");
const PIXI = frame.contentWindow.PIXI;
setTimeout(() => {
window.__PIXI_INSPECTOR_GLOBAL_HOOK__ &&
window.__PIXI_INSPECTOR_GLOBAL_HOOK__.register({ PIXI: PIXI });
}, 3000);
});
</script>
I load unpacked extension and seems like PIXI is detected
but the inspector still looking for pixi.js
from pixi-inspector.
Explicit preview-head.html works
preview-head.html as in docs https://storybook.js.org/docs/configurations/add-custom-head-tags/
<body>
<div id="pixi-canvas"></div>
<script src="./pixi.js/dist/pixi.js"></script>
<script>
console.log(window);
const app = new PIXI.Application({ antialias: true });
document.getElementById("pixi-canvas").appendChild(app.view);
console.log(document.getElementById("pixi-canvas"));
const graphics = new PIXI.Graphics();
// Rectangle
graphics.beginFill(0xde3249);
graphics.drawRect(50, 50, 100, 100);
graphics.endFill();
app.stage.addChild(graphics);
</script>
</body>
Also I can confirm create application inside any files picked by webpack works.
I suspect the wrapper which I'm using causing the issue https://github.com/michalochman/react-pixi-fiber. Closing the issue.
from pixi-inspector.
Related Issues (20)
- Better support for custom `DisplayObject` subclasses HOT 1
- re-add overlay div in refreshed iframes
- Feature: Show anchor dot & add anchor properties
- Add support for simple calculations
- Add support for setters in the Properties panel
- Objects Set To Invisible Block Right Click For Objects Underneath HOT 2
- Undo / Ctrl-Z
- chrome don't has the tab "PixiJS" HOT 4
- Property Window is Empty when selecting node while using custom renderer HOT 3
- Add Support For Adjusting Property Values With Arrow Keys HOT 2
- Iframe HOT 3
- Display zIndex HOT 1
- missing props HOT 3
- Adjusting Pixi Textfield Position HOT 2
- Pixi.js with Vue 3 debug issue HOT 2
- Add "log to console" feature HOT 3
- Release v8? HOT 1
- From Pixi Inspector 1.x, Restore the selected object indicator in the latest version. HOT 1
- Searching for element freezes entire web page [Pixi v4.8.7] HOT 5
- Not possible to expose two pixi apps on the same page? HOT 1
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 pixi-inspector.