-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add example and guide for three + pixi #145
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 suggestions.
Files not reviewed (1)
- src/examples/v8.0.0/examplesData.json: Language not supported
Comments skipped due to low confidence (1)
docs/guides/advanced/mixing-three-and-pixi.md:6
- The word 'Lets' should be 'Let's' in the sentence 'Lets see how to do this.'
Combining the advanced 3D rendering capabilities of Three.js with the speed and versatility of PixiJS for 2D can result in a powerful, seamless experience. Lets see how to do this.
const stage = new Container(); | ||
|
||
// Create a yellow rounded rectangle UI element | ||
const uiLayer = new Graphics().roundRect(20, 80, 300, 300, 20).fill(0xffff00); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The method 'roundRect' should be 'drawRoundedRect' in PixiJS.
const uiLayer = new Graphics().roundRect(20, 80, 300, 300, 20).fill(0xffff00); | |
const uiLayer = new Graphics().drawRoundedRect(20, 80, 300, 300, 20).fill(0xffff00); |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
const uiLayer = new Graphics().roundRect(20, 80, 300, 300, 20).fill(0xffff00); | ||
|
||
// Add text overlay | ||
const text = new Text({ text: 'Pixi and Three.js', style: { fontFamily: 'Arial', fontSize: 24, fill: 'black' } }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 'Text' constructor is called incorrectly. It should be 'new Text('Pixi and Three.js', { fontFamily: 'Arial', fontSize: 24, fill: 'black' })'.
const text = new Text({ text: 'Pixi and Three.js', style: { fontFamily: 'Arial', fontSize: 24, fill: 'black' } }); | |
const text = new Text('Pixi and Three.js', { fontFamily: 'Arial', fontSize: 24, fill: 'black' }); |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
2959b5b
to
24a48d0
Compare
Really trying to get into a habit of creating guides along with new features! So here is a guide for mixing three and pixi in the same context!
dependant on pixijs/pixijs#11142
@Zyie - will leave the dependancy bit with you!