-
Notifications
You must be signed in to change notification settings - Fork 68
Extension update: <3D Sprite> #1957
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
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.
Here is a first review, need probably a bit more review from the OP of the extension before a validation.
| "", | ||
| " // Add a point, if necessary (Avoid recreating a point if it already exists).", |
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.
Put this comment back.
| "", | ||
| " // Add a polygon, if necessary (Avoid recreating a polygon if it already exists).", |
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.
Put this comment back.
| " // Professional visual effects", | ||
| " if (material.emissive) {", | ||
| " material.emissive = new THREE.Color(0x111111);", | ||
| " material.emissiveIntensity = 0.2;", | ||
| " }", |
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.
This will override the existing material if any.
Not recommended to set these values in stone.
| " material.depthWrite = true;", | ||
| " material.depthTest = true;", | ||
| " material.transparent = true;", | ||
| " material.side = THREE.DoubleSide;", |
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.
material.side = THREE.DoubleSide;",
This wasn’t the default behavior, so all previous projects using the extension will now have their sprites visible on both faces. From creator point of view if this wasn’t intended, it introduces a regression in the extension and breaks compatibility with existing projects.
| " // Ensure a forward compatibility when vertexColors will be set to true", | ||
| " // in the engine to allow to tint 3D sprites.", |
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.
Get back the original comments.
| " setAutoRotation(enabled) {", | ||
| " this.autoRotate = enabled;", | ||
| " }", |
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.
This is never used?
|
@Bouh I have a question because I am new to GitHub. Can you tell me what I should do now? I am a little confused. |
|
@Carrotstudio0 Please take some time to familiarize yourself with GitHub and then answer the comment. Ask an AI if needed to explain you what it is :) This won't be difficult once you are used to it. Also please rework the description to avoid any description generated by an AI as explain in another post. AI generated descriptions are counter productive. |
|
@Bouh |
|
✅ Successfully updated the extension. |
Changes
Bug Fixes
Fixed Sudden Background Appearance Issue
depthWrite,depthTest, anddepthFuncsettingspolygonOffsetFactor: -1,polygonOffsetUnits: -1) to prevent z-fighting between overlapping surfacesalphaTest: 0.5threshold to eliminate semi-transparent pixel artifactsJavaScript Compatibility Fix
?.) with traditional null checking for better compatibility with GDevelop's JavaScript runtimeNew Features
Advanced Material System
Dynamic Auto-Rotation System- Velocity-based pitch rotation - Sprites automatically tilt based on vertical movement speed (max 15°)
setAutoRotation(bool)Depth Perspective Effects
Dynamic Render Ordering
setDepthOffset(number)methodEnhanced Control Methods
setDepthOffset(offset)- Manually adjust sprite depth positionsetAutoRotation(enabled)- Toggle automatic rotation behavior on/offsetRotationAngle(axis, angle)- Set specific rotation angles on X, Y, or Z axisPerformance Optimizations
Technical Improvements
castShadowandshadowSidecontrolsHow to use the new features
Auto Rotation
Enable dynamic tilting based on movement:
Manual Rotation
Set specific angles in degrees:
Depth Offset
Adjust sprite layering:
Automatic Features
These work automatically with no code needed:
Checklist
Example file
Sprite3DExample.zip
Extension file
Sprite3D.zip
Extension by @Carrotstudio0
You can update the extension on this "Pull Request" by commenting the update command: in the comment field, type
!update, then drag and drop a zip file with your extension file in the commenting field, like how you initially submitted the extension. It should look like this:It can take a few seconds for the file to fully upload and show as the above. Once it is like shown above, click "Comment" and let the bot do the rest!