mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-01 21:29:07 +08:00
Merge branch '4.1-beta' into 4.2-beta
This commit is contained in:
commit
c620c74bb3
@ -328,6 +328,7 @@
|
|||||||
### Three.js backend
|
### Three.js backend
|
||||||
* `SkeletonMesh` now takes an optional `SkeletonMeshMaterialParametersCustomizer` function that allows you to modify the `ShaderMaterialParameters` before the material is finalized. Use it to modify things like THREEJS' `Material.depthTest` etc. See #1590.
|
* `SkeletonMesh` now takes an optional `SkeletonMeshMaterialParametersCustomizer` function that allows you to modify the `ShaderMaterialParameters` before the material is finalized. Use it to modify things like THREEJS' `Material.depthTest` etc. See #1590.
|
||||||
* **Breaking change:** the global object `spine.canvas` no longer exists. All classes and functions are now exposed on the global `spine` object directly. Simply replace any reference to `spine.threejs.` in your source code with `spine.`.
|
* **Breaking change:** the global object `spine.canvas` no longer exists. All classes and functions are now exposed on the global `spine` object directly. Simply replace any reference to `spine.threejs.` in your source code with `spine.`.
|
||||||
|
* **Breaking change:** the default fragment shader of `SkeletonMeshMaterial` now explicitely discards fragments with alpha < 0.5. See https://github.com/EsotericSoftware/spine-runtimes/issues/1985
|
||||||
|
|
||||||
### Player
|
### Player
|
||||||
* Added `SpinePlayerConfig.rawDataURIs`. Allows to embed data URIs for skeletons, atlases and atlas page images directly in the HTML/JS without needing to load it from a separate file. See the example for a demonstration.
|
* Added `SpinePlayerConfig.rawDataURIs`. Allows to embed data URIs for skeletons, atlases and atlas page images directly in the HTML/JS without needing to load it from a separate file. See the example for a demonstration.
|
||||||
|
|||||||
@ -54,6 +54,7 @@ export class SkeletonMeshMaterial extends THREE.ShaderMaterial {
|
|||||||
varying vec4 vColor;
|
varying vec4 vColor;
|
||||||
void main(void) {
|
void main(void) {
|
||||||
gl_FragColor = texture2D(map, vUv)*vColor;
|
gl_FragColor = texture2D(map, vUv)*vColor;
|
||||||
|
if (gl_FragColor.a < 0.5) discard;
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user